How to get the same value from multiple collections

Hi there

So I am trying to get the same value, an ID, from multiple collections that have the same structure, then put these IDs in an array to be used. I have tried tutorials but can’t seem to figure it out.

I you look here, I’m trying to get the property “id” for each project into an text array that will look like “[id1, id2, id3…]” so that I can pass it into the body of an HTML request. I could also get the name of each collection under projects, which is also the id of the respective project.

The problem I’m also having is that when trying to using the Map function the first argument should be an array. when you put a collection in it doesn’t work. Everything is returned as a collection in Timesheets. Could anyone please help with this?

Hi @kabelk

Use {{toArray()}} function to make projects into array.
Use iterator to iterate all projects and aggregate with text aggregator separated by “,”.

eg:
input:



Output:

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

1 Like

Hi There

Thank you so much for responding

I set it up your way but for some reason get “{{[Collection], [Collection], [Collection]…” as the out put


Not sure why. The value of “7.value.id” where did you get that from? Not sure if that is causing the problem. But it looks as though the iterator is the problem

For more context, this the output of the iterator. We could use this to get an “[id1, id2, id3]” final output?

Alsto to add more, for this input this is the output I get