What I need is the “id” for every project. I know you can use join(map()) in the scenario that there’s a high level array you can plug into however in my case I can’t. I’ve tried toArray on a higher level collection as suggested in a previous post but that doesn’t work. After everything I’ve tried the best I can do is this
which gives one individual id. is there a way to generalise the above equation? or is there a way to loop with get() without spending too many operations?
I think you want to use map on an array, but projects is a collection.
You can use the built-in function toArray to convert a collection into an array.
e.g.:
{{ toArray(24.results) }}
Once you have an array, then you can use join.
For more information, see
Links
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —
Please try with the below method. This will result project ids separated by comma. If you want in array simply use map.
{{join(map(toArray(2.results.projects); “key”); “,”)}}
My thinking is that the “linked_objects” object is interfering with toArray(). No matter what I try, when using myArray() the scenario returns an empty object. I don’t even have access to the key. Probably when using “2.results.id” cannot have anything nested in it.