json
Command
The json
command parses JSON input.
Usageβ
json <json_string>
Parametersβ
Parameter | Description | Required? | Default Value |
---|---|---|---|
json_string | String 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