← All nodes
Parsing

Rows to JSON

The reverse of JSON to Rows: writes rows out as JSON — one list of every row, one list per group, or one object on each row — into a column.

When to use it

Use it to build a request body for an API, nest order lines under their order, or hand a JSON column to JSON Parse / Flatten or JSON to Rows further on.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
Makeselect—array
Group byselect—Columns that make a group
Columns to includeselect—Blank: every column
JSON column nametext—JSON
Wrap the list in a keytext—Optional, e.g. items → {"items": […]}
Nest dotted names (customer.name → {customer: {name}})checkbox—false
Indent the JSONcheckbox—false
Keep the other columns on each rowcheckbox—true

Example

Order lines nested under their order

  • Make=One JSON list per group
  • Group by=Order
One row per line
Orderskuqty
A-1A2
A-1B1
A-2C5
One row per order
OrderJSONRow Count
A-1[{"sku":"A","qty":2},{"sku":"B","qty":1}]2
A-2[{"sku":"C","qty":5}]1

Worth knowing

  • Columns to include picks what goes into the JSON (blank is every column); group columns are left out of the items because they are already on the row.
  • Nest dotted names turns customer.name and customer.city into {"customer": {"name", "city"}} — the shape JSON Parse / Flatten takes apart.
  • Wrap the list in a key gives {"items": […]} for APIs that expect an object rather than a bare list.
  • Values keep their types: numbers stay numbers and blanks become null.

Others in Parsing