How to map values inside a collection that's inside an array?

Goal

My goal is to have a string like this: tag1,tag2,tag3

Steps taken so far

I am getting the tags from a webbook. In my case, I want to extract the ‘name’ value.

When I use the Set Variable module, it does not show me the ‘name’. Why is that?

Anyway, the output of Set Variable module is an array of collections, which I then iterate over and use a text aggregator.

As you can see, I am getting the text, but I don’t know how to add a comma between them.

Question:

  1. Can I optimize this to take fewer operations?
  2. How can I get the text separated by a comma?

Screenshots: scenario setup, module configuration, errors




To do this, you can use these built-in functions:

  • map
    map(complex array; key; [key for filtering]; [possible values for filtering separated by a comma])

  • join
    join(array; separator)

These functions may have also been covered in the Make Academy tutorials — refer to the Make Academy Course Overview for more info.

Here’s an example of how you can use these functions together:

{{ join(map(1.data.properties.tags.multi_select; name); ",") }}
(copy-paste the above into the field, or type it exactly as shown)

For more information, see Mapping with Arrays below:

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

1 Like

Thank you so much! It worked like a charm.
I was seriously struggling so much.
This worked, I’ll definitely checkout the course :slight_smile:

P:S- I tried using the AI feature and it did not tell me this, gave some solution that did not work.

Yeah, you can’t use AI to help you with Make, unless it’s the one that’s trained on my 10,000+ forum posts.

Oh, I meant the AI feature that’s integrated inside the Make scenario.
But I think they should train on your forum post, hahah.