from json for formats

Convert from json to structured data.

Signature

> from json --objects

Parameters

  • --objects (-o): treat each line as a separate value

Input/output types:

inputoutput
stringany

Examples

Converts json formatted string to table

> '{ "a": 1 }' | from json
╭───┬───╮
│ a │ 1 │
╰───┴───╯

Converts json formatted string to table

> '{ "a": 1, "b": [1, 2] }' | from json
╭───┬───────────╮
│ a │ 1         │
│   │ ╭───┬───╮ │
│ b │ │ 01 │ │
│   │ │ 12 │ │
│   │ ╰───┴───╯ │
╰───┴───────────╯