How can I compare 2 arrays to find common items. Say I have and object that is in 2 different arrays and I want to be able to do something with any of the objects that exist in array X and array Y, and ignore any elements that don’t exist in both?
Make a For Each Loop (Array 1)
In the loop:
Make For Each Loop (Array 2) -> Output Element Array 1 = Output Element Array 2 -> return Found
But this will probably kill the performance if the arrays are big, and if the Item at the end of an array is.
Arrays probably support a “find” (in array) function - you could try this too - if existing.
You add them to a third array.
1 Like
Actually there’s a node called Identical it can compare two arrays much faster than using two blueprints loops. I suggest to use this node instaed
Link to official documentation page:
1 Like


