← All nodes
Parsing

JSON Parse / Flatten

Turns JSON held in a column into ordinary columns — every value gets its own column named by its path (customer.city) — or picks out one value by path.

When to use it

Use it when an API, a database or an export hands you JSON text in a cell and you need the values inside as columns you can filter, join and export.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
JSON columnselectYesSelect column…
Modeselect—flatten
Pathtext—Optional, e.g. customer.address or items[0].sku
Max depthnumber—10
Keep the JSON columncheckbox—false
New Column Nametext—Default: the last name in the path

Example

Order payloads into columns

  • JSON column=Payload
  • Mode=Flatten — one column per value
Orders with a JSON payload
OrderPayload
A-1{"customer":{"name":"Ann","city":"Leeds"},"total":120}
A-2{"customer":{"name":"Bob"},"total":80}
One column per value
Ordercustomer.namecustomer.citytotal
A-1AnnLeeds120
A-2Bob—80

The JSON column is replaced by its values; a key one row lacks is blank on that row.

Worth knowing

  • Run or preview once before picking columns downstream: the new column names come from the data, so the pickers only know them after the node has seen it.
  • Lists flatten by position (items.0.sku, items.1.sku). To get one row per item instead, use JSON to Rows.
  • Max depth stops flattening: anything deeper stays as JSON text in one column, ready for a second JSON Parse.
  • Extract mode takes a Path like customer.address.city or items[0].sku and adds just that value, after the JSON column, named after the last part of the path unless you name it.
  • Cells that are not valid JSON are left blank and counted in the node's note.

Others in Parsing