Pluck one path from JSON input.
gem install dorian-json-pluckAlso included in the aggregate gem:
gem install dorianjson-pluck [options] key [key ...] [file ...]Run json-pluck -h for generated option details and json-pluck -v for the installed version.
- Keys can be hash keys or array indexes. Use
--jsonfor pretty JSON output or--rubyfor Ruby inspection output.
echo '[1,2,3]' | json-pluck 0Output:
1