Adobe Fusion: Using the map() function to get array with more than one key/filter | Community
Skip to main content
New Participant
April 23, 2024
Question

Adobe Fusion: Using the map() function to get array with more than one key/filter

  • April 23, 2024
  • 1 reply
  • 875 views

Hello, 

The map() function allows you to get a subarray using filtered values. For example, if I have map(People[]; first_name; age; 20), the results will be a subarray that contains all the first_name variables in array People[] where the age is equal to 20. I am wondering if there is a way to use this function to get multiple variables in my subarray with multiple filters. For example, if I want to get all the first_name and last_names in array People[] where age is equal to 20 and height is equal to 172, does anyone know if there's a way to use the map filter to get this information? If not, is there any low operation way of getting a subarray with various filters on the big array?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

ChrisStephens
New Participant
April 24, 2024

The way I do it is basically...

dedupe(merge(map(people;first_name;height;20);map(people;first_name;height;70))

Unfortunately there's not a very clean way to do it.