W3cubDocs

/Nushell

from json for formats

Convert from json to structured data.

Signature

> from json {flags}

Flags

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

Input/output types:

input output
string any

Examples

Converts json formatted string to table

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

Converts json formatted string to table

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

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/from_json.html