Lesson 4 / 25
Items and Expressions
Understand that data moves as a list of items and read values with expressions.
A list of JSON items
Data between nodes is a list of items, and each item is an object with a json field. A node usually runs once per item. In any field you can write an expression in double curly braces: {{ $json.email }} reads a field from the current item, and {{ $("Webhook").item.json.name }} reads from an earlier node.
Items and expressions
Three items mean the next node runs three times. Expressions are JavaScript, so you can transform values inline.
Items flowing out of a node:
[ { json: { name: "Asha", total: 1200 } },
{ json: { name: "Ravi", total: 8000 } },
{ json: { name: "Meera", total: 450 } } ]
Expressions in the next node:
{{ $json.name }} -> Asha, Ravi, Meera (one run each)
{{ $json.total * 1.18 }} -> total with 18% tax
{{ $json.name.toUpperCase() }} -> ASHA, RAVI, MEERACheck the Input panel
When an expression fails, open the node and look at the INPUT panel: field names are often different from what you assumed (Name versus name), and you can drag a field into an expression to get the exact path.
Quick check: A node receives 3 items. How many times does it normally run?
- Once for all items together
- Three times, once per item
- Never
- Exactly ten times
Answer
Three times, once per item — Most nodes run once for each incoming item, though some can process all items together.