I have a JSON data file (as shown below) and I\'m trying to find field values using jq utility.
It\'s working fine except for fields if the key name contains a
I don't know about jq, but you put python in the tags so:
$ cat test.json | python -c "import sys, json; print(json.load(sys.stdin)['content']['book1']['field-three']['name'])"
THIRD
or without the pipe:
$ python -c "import json; print(json.load(open('test.json'))['content']['book1']['field-three']['name'])"