Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Split a JSON (column) object into multiple fields, where the new field names consist of the input field name followed by underscore (_) followed by the JSON field ID.

Operator Usage in Easy Mode

  1. Click + on the parent node.
  2. Enter JSON to Columns operator in the search field and select the operator from the Results to open the operator form.
  3. In the Input Table drop-down, enter or select the table containing the data to run this operator on.
  4. In the JSON Field drop-down, enter or select the column that splits the JSON objects into multiple columns.
  5. In the Defaults Field, click Add More to add a string of default field names.
  6. Click Run to view the result.
  7. Click Save to add the operator to the playbook.
  8. Click Cancel to discard the operator form.

Usage Details

LQL Command

Code Block
jsonToColumns(table, "jsonField")

-- with default fields
jsonToColumns(table, "jsonField", "a", "test_1")

...

Output:
A JSON object that is split into multiple columns. Each column is in the form jsonField__id, where jsonField is the input field and id is the JSON ID.

Example

Input
table = github_logs

idjsonField
id{"a":{"b":2,"u":1},"e":3}
id{"a":{"b":4,"v":9},"c":5,"d":7}

...