Arrays Overlapping outside of Query

Options

Hi!

I saw that Xano has the Query Operator OVERLAPS.

However, in the normal "if"-statement (not in a db-related query, but simply an "if" condition), this OVERLAPS doesn't exist.

How can one compare two arrays to each other and find out whether or not there is any matching value between the entries of both arrays?

As in:

array1=[1,2,3]

array2=[3,4,5]

the IF would revert as TRUE because the value 3 is in both.

What's the best way to compare two arrays for any common value?

Best Answer

Answers