Hey guys,
I want to compare each element of one list (list A) to all elements of a second list (list B). and return the index of the matching in list B
example: (not a correct code of course)
for a in listA
{
for b in listB
{
if (a = b ) return index of b
}
}
I’ve tried to use " indexof " node but it doesnt work
Any help is much appreciated.
Thank you.
T_Pover
2
You could try the node List.AllIndicesOf:
Yna_Db
3
Hi, you could use “Equal x to y?” to compare the 2 lists, and potentially “Filter by boolean mask” if relevant:
Yna_Db
4
… and if it doesn’t work, you can also try this node from Bakery:
![](//cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/f/4/f460fdef4ff6c59fbbfc676af3b8763bfce6d747.JPG)
Thanks a lot, it worked perfectly ![:smiley: :smiley:](https://emoji.discourse-cdn.com/twitter/smiley.png?v=5)
the X=Y didnt work, i will try the Bakery node, Thanks a lot ![:smiley: :smiley:](https://emoji.discourse-cdn.com/twitter/smiley.png?v=5)