Parse JSON
Parses a JSON string into a native object or array, making its fields accessible via expressions in downstream nodes.
Properties
| Property | Required | Description |
|---|---|---|
| JSON Input | Yes | The JSON string to parse. Supports expressions |
Output
| Field | Type | Description |
|---|---|---|
data | Object | Array | The parsed JSON value. An object when the root is {}, an array when the root is [] |
Access the output in downstream nodes:
{{ $nodes['Parse JSON'].data }}
{{ $nodes['Parse JSON'].data.user.email }}
{{ $nodes['Parse JSON'].data[0].id }}
Replace Parse JSON with the actual name you gave the node.
Behaviour
- An empty or whitespace-only input produces
data: nullwithout failing. - If the string is not valid JSON the node fails with a parse error.
- All standard JSON value types are preserved: objects, arrays, strings, numbers, booleans, and
null.
Example
Parse a JSON response from an HTTP request and read a field:
- Add an HTTP Request node to call your API.
- Add a Parse JSON node. Set JSON Input to
{{ $nodes['HTTP Request'].responseBody }}. - In a downstream node, access fields with
{{ $nodes['Parse JSON'].data.fieldName }}.
To loop over a JSON array response:
- After Parse JSON, connect a Loop node.
- Set Items to
{{ $nodes['Parse JSON'].data }}. - Inside the loop body, reference each item with
{{ $nodes['$loop'].currentItem }}.