I am looking for an opportunity to print parts of a returned JSON document in a wrapper.
Right now, I am passing an HTTP response from cURL to python to print it:
curl -vX GET http://foo.bar | python -mjson.tool
But now I would like to know how I could βgo throughβ the path to a subarray?
If, for example, JSON data was returned:
{
"value1": true,
"value2": {
"subvalue1": "foo",
"subvalue2": "bar"
}
}
How can I print only subarms in this example?
source
share