This would require some custom JS. I assume the array from another node is an array of multiple n8n items? If so, here’s a quick example I’ve whacked together using the $items method and JavaScript’s .includes(). You should be able to adjust it to your needs even if your data structure is slightly different:
Example Workflow
This will add an isInArray field to each input item, telling you whether your String is in the array:
Glad to hear this is working, thanks a lot for confirming!
The correct link should be: Key concepts | Docs, sorry for the 404. The main difference is indeed that the Function Item node loops through all incoming items (whereas the Function node gets executed only once).
In the above example workflow this would allow you to perform the lookup for multiple items as it would check for each input item whether the value appears in the referenced array.
I was speaking to @maxT about this today and he suggested another approach that I did overlook earlier.
As a code-free approach, you could also use the Merge node’s Keep Key Matches mode to keep only the matching items:
Example Workflow
The merge node also has a Remove Key Matches mode in case you want to find items that are not part of your array. Hope this makes life a tad easier for you