How do I access the entire output of current iteration?

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.

Select parse content no

Welcome to the Make community!

You can use the JSON “Transform to JSON” module to convert the current iteration back to JSON.

Hope this helps! Let me know if there are any further questions or issues.

@samliew


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!

How exactly would turning off parsing in the HTTP request help?

As I still have to parse the JSON in order to iterate over it with the flow control iterate module.

I attempted to use Transform to JSON, but alas it still does not help as I cannot “select” the root of the current iteration.

What I am trying to do is this.

  1. make request to select a list of items (eventually will need to do multiple request as the result is paginated)
  2. iterate over the results array in that response
  3. pass the ENTIRE contents of each member to a custom function so it can be transformed (I found no other way to do this in Make)
  4. pass the HTML document to an external service to convert it to a docx

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.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

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.