{"action":"created","issue":{"url":"https://api.github.com/repos/google/jsonnet/issues/62","labels_url":"https://api.github.com/repos/google/jsonnet/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/google/jsonnet/issues/62/comments","events_url":"https://api.github.com/repos/google/jsonnet/issues/62/events","html_url":"https://github.com/google/jsonnet/issues/62","id":103028367,"number":62,"title":"Support dynamic includes","user":{"login":"davidreuss","id":6885,"avatar_url":"https://avatars.githubusercontent.com/u/6885?v=3","gravatar_id":"","url":"https://api.github.com/users/davidreuss","html_url":"https://github.com/davidreuss","followers_url":"https://api.github.com/users/davidreuss/followers","following_url":"https://api.github.com/users/davidreuss/following{/other_user}","gists_url":"https://api.github.com/users/davidreuss/gists{/gist_id}","starred_url":"https://api.github.com/users/davidreuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidreuss/subscriptions","organizations_url":"https://api.github.com/users/davidreuss/orgs","repos_url":"https://api.github.com/users/davidreuss/repos","events_url":"https://api.github.com/users/davidreuss/events{/privacy}","received_events_url":"https://api.github.com/users/davidreuss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-25T13:58:54Z","updated_at":"2015-09-02T06:25:31Z","closed_at":null,"body":"Hello,\r\n\r\nFirst of all, jsonnet is really great - it's very good at what it does.\r\n\r\nIs there any reason why you can't do something like:\r\n\r\n```\r\nimport \"whatever_%s.json\" % my_var\r\n```\r\n\r\nIt would be quite helpful for my usecases, so you can avoid writing scripts, with weird jsonnet invocations, to \"emulate\" that behavior."},"comment":{"url":"https://api.github.com/repos/google/jsonnet/issues/comments/136948991","html_url":"https://github.com/google/jsonnet/issues/62#issuecomment-136948991","issue_url":"https://api.github.com/repos/google/jsonnet/issues/62","id":136948991,"user":{"login":"sparkprime","id":168158,"avatar_url":"https://avatars.githubusercontent.com/u/168158?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkprime","html_url":"https://github.com/sparkprime","followers_url":"https://api.github.com/users/sparkprime/followers","following_url":"https://api.github.com/users/sparkprime/following{/other_user}","gists_url":"https://api.github.com/users/sparkprime/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkprime/subscriptions","organizations_url":"https://api.github.com/users/sparkprime/orgs","repos_url":"https://api.github.com/users/sparkprime/repos","events_url":"https://api.github.com/users/sparkprime/events{/privacy}","received_events_url":"https://api.github.com/users/sparkprime/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T06:25:31Z","updated_at":"2015-09-02T06:25:31Z","body":"Ok, implemented that: https://github.com/google/jsonnet/commit/0299d84a5aa4c35c346125fa6ac31a14d6a923ff\r\n\r\n@davidreuss you should be able to do something like this now:\r\n\r\ndata=$(...)\r\nexport data\r\njsonnet --code-env data script.jsonnet\r\n\r\nand then script.jsonnet can do std.extVar(\"data\") which will yield the json struct\r\n\r\nPlease let me know if that works out for you :)"}}