I am wanting to pass the entire collection from a single iteration to a function. However, the UI only allows me to select individual entries in the collection to pass through.
e.g. HTTP query returns an array of objects. {results: [ {id: 1, name: "bob"}, {id: 2, name: "larry"} ]}
Thus the first iteration delivers the collection {id: 1, name: "bob}. However I am only able to grab map variables for id or name, NOT the entirety of the Flow Control - Iterator output.
P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!
Ah, in that case since you already have each item iterated, you can simply use a Text Aggregator with the JSON format that you want, mapping all the values into the JSON.
Hope this helps! Let me know if there are any further questions or issues.
That does not quite help. As that allows me to build a text body with a fixed structure input. Howver, my payload is not fully ridged, and can change. Specifically some fields can be blank and I need to adjust the generated output based on that, and one of the fields is a collection with varying keys that need to be addressed dynamically. Plus those keys in that collection need to be looked up against another map of data to obtain names and other details.
Thus, I really need to pump this into a custom function and ideally pushing the “top node” of the output of the iterator. thus a change in make needs to happen to allow selecting the top-level “collection” node of the output from the iterator to support this.
Right now I have had to give up on using Make as it cannot support my use-case and went to writing a AWS Lambda to do the same work.