How to check if an array contains any element of another array in bubble?

I have a target array [“apple”,“banana”,“orange”], and I want to check if other arrays contain any one of the target array elements. And pull that element out to results.

For example:

[“apple”,“grape”] //returns apple;

[“apple”,“banana”,“pineapple”] //returns apple and banana;

[“grape”, “pineapple”] //returns false;

PS. This needs to be done in the backend workflow

This topic was automatically closed after 70 days. New replies are no longer allowed.