If condition with multiple value in an array

Hi guys!

I have a question for my workflow.

I would like to check if the array of json items have, or not, one value or more. I thought to set this node with a IF statement, where if it have more than one element it’s true, for other conditions false.

What do you think? How i do that?

This is my items array:

"[email protected]",
"[email protected]",
"[email protected]"

I want to check only “emails”:

True branch: items with more than 1 email
False branch: items with 1 email or empty

Information on your n8n setup

  • **n8n version:[email protected]
  • **Database: SQLite
  • **n8n EXECUTIONS_PROCESS setting: own
  • **Running n8n via desktop app
  • **Operating system: Win

Hi @LucaDipa ,
you can use the expression {{ $json.contactDetails.emails.length }} in the if node (Number condition) and then check if the length is > 1.

See the example below:

Let me know if this solves your problem


Yes, perfect!

Thanks Giulio :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.