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