Map variable path depending on output


I have an array output customFields with inside it 1, 2, 3 or 4 collections.

The problem is that the customFields are not always in the same order, so I have to know where the field “Leveranciers” is each time.

Is it possible to get the value of:
->customFields->X->selectedValues->1->label (=Contentful)
->customFields->X->label = Leveranciers

I tried 4 nested IF functions, but that did not work.


Hi. As they are in an array, you can use map to look and retrieve any custom field data by the label
{{map(“ARRAY HERE”; “VALUE DO YOU WANT HERE”; “label”; “Leveranciers”)}}

If you need additional support, please don’t hesitate to reach out.


Thanks! I found it, but it was a little bit more complicated, I had to combine map() and get().


1 Like