aki-json-pick is the json pick out command.
-
text
aki-json-pick --help
```text Usage: aki-json-pick [options]
The json pick out command.
Options:
--color
-H, --help display this help and exit
-V, --version display version information and exit
-X
Option Parameters:
Examples: pick out some.property value: echo -e '{ "some": { "property": "yay!" } }' | aki-json-pick -s '"some"."property"' ```
text
cargo install aki-json-pick
text
cargo deb
and install .deb into your local repository of debian package.
command line:
cat fixtures/01.json | aki-json-pick -s '.'
result output:
"This is a valid JSON text with one value"
command line:
cat fixtures/01.json | aki-json-pick -s '"some"."property"'
result output:
"yay!"
command line:
cat fixtures/01.json | aki-json-pick -s '"primes".[0]'
result output:
7
command line:
cat fixtures/01.json | aki-json-pick -s '"primes"[0]"'
result output:
7
command line:
cat fixtures/01.json | aki-json-pick -s '"primes".[2,0]'
result output:
[13,7]
This crate use jql. The selector
is comatible.
See [fn execute()
] for this library examples.