JSON Basics
JSON is a structured, universal data format that gives workflows a predictable way to represent values and objects. It keeps data consistent across HTTP requests, webhooks, APIs, and node outputs, making it easier for tools to read, compare, and transform information without errors.
JSON is essentially a pattern, the same fields appearing in the same places every time. Almost everything in n8n relies on two core shapes: Objects and Arrays. Data moves between nodes as an array of items, where each item contains a $json object. When the structure is consistent, workflows run smoothly; when it's off, nodes start to misbehave.
Object with Named Fields
customer.json
Curly braces { } represent an object, a structured record made up of key–value pairs. You can think of it like a single spreadsheet row, where each column header (key) has a corresponding cell value.
Array or List of things
A list of values. It is used when you just need simple items in order:
customers.json
A list of objects. It is used when each item has its own fields or attributes:
products.json
Square brackets [ ] represent an array, an ordered list of items. You can think of it as multiple spreadsheet rows, each one holding similar structured data.
An object represents one thing, while an array represents many. Mix up the brackets, and the parser will complain.
These are the core data types that make up every JSON structure.
Most API payloads are simply combinations of these building blocks.
How n8n Actually Represents JSON
In n8n, every node outputs data in a consistent structure: an array of items, where each item contains a $json object. You can view and manipulate this data in different ways, but the underlying structure always stays the same.
- Each node outputs an array of items, each holding a
$jsonobject; - Access specific fields using expressions like
{{$json["customer"]["first_name"]}};
- Switch between Schema, Table, and JSON views, they show the same data differently;
- Use Split Out / Item Lists to break arrays into individual items;
- Use Aggregate / Item Lists to combine multiple items back into a single list for AI or batch processing.
Kiitos palautteestasi!
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 4.17
JSON Basics
Pyyhkäise näyttääksesi valikon
JSON is a structured, universal data format that gives workflows a predictable way to represent values and objects. It keeps data consistent across HTTP requests, webhooks, APIs, and node outputs, making it easier for tools to read, compare, and transform information without errors.
JSON is essentially a pattern, the same fields appearing in the same places every time. Almost everything in n8n relies on two core shapes: Objects and Arrays. Data moves between nodes as an array of items, where each item contains a $json object. When the structure is consistent, workflows run smoothly; when it's off, nodes start to misbehave.
Object with Named Fields
customer.json
Curly braces { } represent an object, a structured record made up of key–value pairs. You can think of it like a single spreadsheet row, where each column header (key) has a corresponding cell value.
Array or List of things
A list of values. It is used when you just need simple items in order:
customers.json
A list of objects. It is used when each item has its own fields or attributes:
products.json
Square brackets [ ] represent an array, an ordered list of items. You can think of it as multiple spreadsheet rows, each one holding similar structured data.
An object represents one thing, while an array represents many. Mix up the brackets, and the parser will complain.
These are the core data types that make up every JSON structure.
Most API payloads are simply combinations of these building blocks.
How n8n Actually Represents JSON
In n8n, every node outputs data in a consistent structure: an array of items, where each item contains a $json object. You can view and manipulate this data in different ways, but the underlying structure always stays the same.
- Each node outputs an array of items, each holding a
$jsonobject; - Access specific fields using expressions like
{{$json["customer"]["first_name"]}};
- Switch between Schema, Table, and JSON views, they show the same data differently;
- Use Split Out / Item Lists to break arrays into individual items;
- Use Aggregate / Item Lists to combine multiple items back into a single list for AI or batch processing.
Kiitos palautteestasi!