Array of Collections - Can't access individual Collection

Hi everyone,

I have been banging my head against the wall for a few hours now and tried finding a helpful thread in this forum but still can’t figure it out somehow so maybe one of you can help?

The scenarios is as follows:

I am deceiving a webhook that includes an array of collection:

Screenshot 2024-01-10 at 17.38.48

I am trying to access the objects in my flow individually. But whatever I do it seems like this array is being treated like a string and I don’t know what to do.

I tried:

  • creating a separate variable for the promotions array to access its children
  • split(promotions;,) but that seemed to only split the string of [Collection], [Collection] into 2 bundles of [Collection] strings. I still can’t access the actual collection object
  • parse JSON - that just created a JSON {[Collection],[Collection]}
  • get(promotion;1) - only selected [Collection], [Collection] again
  • also tried map() but can’t remember what the error here was but it didn’t work. Every tutorial and example out there seems to have access to each bundle of the array directly but for me it is just [Collection], [Collection] for whatever reason instead of individual bundles.

I seem to be misunderstanding how arrays of collections work in make. the original JSON (screenshot above) seems to be valid. I just cant figure out what i am doing wrong.

Any hints would be appreciated!

Hey @sebschaeffer
Welcome to the Make Community

Use Iterator it will iterate the collection of array in bundles.
Then you can access bundles easily

Thanks,
Sachin Shrivastava

2 Likes

Hey @sachin.shrivastava,

thanks for your reply! Forgot to mention that I tried that too but it turns out like this:

Screenshot 2024-01-10 at 21.19.16

Can you share your blueprint of secanrio

2 Likes


Here is the overview of the scenario. The parameter in the iterator is the one I posted above. Does that help?

Did you enable JSON passthrough for the webhook?

2 Likes