I have a simple JSON stringified array like ["https:\/\/url1.com", "https:\/\/url2.com", "https:\/\/url3.com"]. I’m parsing the array to JSON which gives me a set of bundles as the output.
Now I need to aggregate the bundles to JSON but I can’t reference the urls from my bundles in the Aggregate To JSON step, presumably because the items in my bundles don’t have keys.
So how can I assign a key to each bundle to create bundles like url: url1, url: url2, url: url3? I’d like to avoid iterating over the bundles just to assign keys to them, to avoid wasting operations.
Defining the data structure like this doesn’t have any effect, I still just get a set of bundles containing the urls no keys as the output of the parse JSON step -
No, you must aggregate otherwise the subsequent modules consume one operation per bundle (i.e.: 5 instead of 1)
Aggregating the bundles immediately only outputs a single bundle, so only one operation is used.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module.
Other types of aggregators include “Numeric aggregator”, “Text aggregator”, “Create CSV”, “Create Archive”, “Create JSON”, etc.
If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy, and learn advanced skills like how to make custom apps to any API in the Make Partner Training Portal - both have certificates for successful completion.