CLI command to query JSON documents using jsonpath (xpath for JSON).
Using npm:
npm install --global cGuille/jpath
# Using the -f option:
jpath -f document.json [jsonpath query]
# Using standard input redirection:
jpath [jsonpath query] < document.json
command-writing-json-to-stdout |jpath [jsonpath query]
echo '[ { "name": "John Doe", "age": 53 }, { "text": "dummy" }]' |jpath '$..name'
#-> [ 'John Doe' ]