Skip to Content
DocumentationTransformsSplit JSON Array to Rows

Split JSON Array to Rows

Creates one row per value in a JSON array while duplicating other column values.

Example

id

data

1

[“burger”, “fries”]

2

[“steak”, “salad”]

id

index

parse

10

burger

11fries
20steak
21salad

Configuration

Parse Type

JSON Array should be selected for this transform.

Column

Select a column to parse as JSON arrays.

Screen Shot of Split JSON Array transform

Adding the Transform

  1. Select a column with JSON array data by clicking its column header in the table.
  2. Find Split JSON array transform under JSON group.

Alternatively, you can click on + Add Script Step on the right of the wrangler to find Split JSON array under JSON group.

Screen Recording of adding the Split JSON array transform

Key Considerations

  • This transform replaces the original columns with new columns.
  • The default names of the two new columns are index and parse, to rename or remove them you can use the Rename Column, and Drop Column transforms.
  • Values that aren’t parsed as arrays in the original row are duplicated to the new rows.
  • The number of values in the selected array defines the number of output rows. Rows that have a null value or empty array in the original column will be dropped from the output of this transform. If you prefer the original row to be retained, you can do this by introducing the additional steps describe at the bottom of the JSON Parsing guide.