Skip to main content

json Command

The json command parses JSON input.

Usage​

json <json_string>

Parameters​

ParameterDescriptionRequired?Default Value
json_stringString representation of JSON dataβœ”οΈ

Examples​

Parse JSON string
> json "test"
​test
Parse JSON object
> json {"a": 1, "b": 2}
​a: 1
​b: 2
Parse array of JSON objects
> json [{"a":1, "b": 2}, {"c": 3, "d": 4}]
​a: 1
​b: 2
​---
​c: 3
​d: 4