As we do not like people to be driven bonkers I try my best to help you!
You are having this issue because you are comparing the data of two nodes that have a different number of items.
Search Value:
- Item: { name: ‘foo’ '}
Test Data:
- Item: { name: ‘bar’ '}
- Item: { name: ‘foo’ '}
So in the IF-Node the following is happening because n8n automatically compares the items with the same index:
- Item: It compares “foo” with “bar” => does not match so
false - Item: It compares
undefinedwith “foo” => does not match sofalse
Hope that helps!