Filter JSON - Multiple Fields

I have a list of users being pulled into n8n and those users have phone numbers associated with one of three possible fields, phonenumber, mobilenumber and mobilenumber2. Some users could have all 3 populated, some users could have none. What I’m trying to do is filter the list so that any users without at least one of those fields populated is dropped. I played around with items.filter, but I’m not sure how to combine multiple (other than using slice(), but that works as AND not OR). Thank you.

Hey @cleveradmin,

What about using an If node and setting all 3 fields to check if they are empty then at the bottom setting it to all that way the only items that would go to the true branch would be those with no number set.

Ah, I think that would work, yes. I would just then set TRUE to no operation and FALSE to my next node. I’ll give that a try. Thanks as always Jon.

1 Like