Grunt task to assemble JSON files from filenames in JSON
Clash Royale CLAN TAG #URR8PPP Grunt task to assemble JSON files from filenames in JSON I have a JSON file that looks like: { "someRandomStuff": "myRandomStuff", "includeNodesFromFiles": { "item1": "item1.json", "item2": "item2.json", "item3": "item3.json" } } And now I want to replace item1, item2, and item3 with JSON content from each respective file, so the destination file would look like: { "someRandomStuff": "myRandomStuff", "includeNodesFromFiles": { "item1": {"whatever": "...whatever was in item1.json"}, "item2": {"whatever": "...whatever was in item2.json"}, "item3": {"whatever": "...whatever was in item3.json"}, } } Or similarly for an array: { "someRandomStuff": "myRandomStuff...