Get data from several collections

Hello everyone,

I have a question in order to improve a thing.

I have a list of item in facilities and sub facilities from different places, as you can see in the image below


I’ve manage to get them with a module set multiple variables.

But for some places, there will be only 5 facilities and 20 or more for others. And as you can see in the first image, some facilities are in the collection 1, others in 2, etc. And i don’t know the number of collections in facilities before.
Is there any possibilities to optimize that ?

Just to be clear, i found the solution to set multiple variable after 3 hours of test. my level of knowledge on this is low.

Many thanks for your help

Constance

Welcome to the Make community!

  1. Insert the top-level facilities array variable into an Iterator module.

  2. Use a Set Variable module with the following value:

{{ join(map(1.facilities; "name"); ", ") }}
  1. Finally, use an array aggregator module

For more information, see

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 —

Getting Started

Help Centre Basics

Articles & Videos

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.