Iterate a json array

Hi there,
Quite new here in Make and have been working on something for a few hours but cannot find the solution.

My first trigger is Cognito, a form generator, which has a table where users can add multiple items (an item is made of several fields such as Name, DOB and so on)

Now, I want to make an HTTP request to an API and use the array of the different values coming from the form.

I have been trying to use an “ITERATOR” and I can see the n (2 in this case) bundles being generated (image attached), but when I try to ad the array in the JSON file, Make would only write the first bundle.

What am I doing wrong?

Thanks

Max

You need to use an array aggregator and parse the array output to a JSON module

1 Like

Thanks! I’ll definitely try it

Max

I tried but it doesn’t work.
As you can see here below, I used an Array Aggregator and I can see that there are 3 Traveller’s details but when I send it to the json module, the output captured is only 1 bundle.

I have used “Create JSON” module

Any idea why this might be happening?

Max


Try the “aggregate to json” module

I tired but smae result.
Although the source in Cognito has an array with 3 items, in the JSON aggregator the input is just 1

Max


Uploading: Screenshot 2022-07-06 at 9.09.55 AM.png…

Can you screenshot for me how you set up the aggregate to json module?
And the data structure you are using for the same.

:pray:

okay!
Quickest solution use the iterator module between cognito forms and aggregate to json.
iterate the travelers details array
set the variables in the aggregate to json from the iterator, not cognito forms.

2 Likes

It works!

Thanks so much for your help

Max

2 Likes