I am looking for a possibility to print parts of a returned JSON document on the shell.
Right now, I am piping a HTTP response from cURL to python to prettyprint it:
curl -vX GET http://foo.bar | python -mjson.tool But now I would like to know how I could actually "walk" the path to a subarray?
If was for example the returned JSON data:
{ "value1": true, "value2": { "subvalue1": "foo", "subvalue2": "bar" } } How could I only print the subarray in this example?