Hello i need to seach an item inside an array aggregator

Hello i need to execute a single action if there is a phone number in the list.

For example: if 389***** is in the array > “you are in the list” else “you are not in the list”

Can someone help me?
Thanks a lot

You can use map to get this done, basically what you want to do is either add a filter before the module that you want to trigger the message you are in the list or not,

What you want to do is, setup a Set a variable module and do the following logic there,

{{if(length(map(2.array; “Number”; “Number”; 389)) != 0; “you are in the list”; “you are not in the list”)}}


@Runcorn thank you so much! Your answer is not fully correct but helped me to find a solution reading the documentation. The map() functions wants the raw name of the value item.

In this case, Number is not the raw name.

I solved it using this expression

{{if(length(map(2.array; “phone”; “phone”; 389)) != 0; “you are in the list”; “you are not in the list”)}}

The screenshot can explain better.

Thank you so much again!

1 Like

Hello there @Akida welcome to the community :wave:

I just wanted to quickly jump in and say congrats on figuring this one out with the assistance of @Runcorn. It’s great to see that you managed to get things up and running :clap:

Also, thank you very much for getting back to us and sharing your final solution with the community. This is super valuable stuff and could prove incredibly helpful to many other users :pray:

Just FYI: I marked your last comment as a solution to help keep the community organized and make it easier for others searching for similar information in the future. :white_check_mark:

1 Like