I'm using jq to parse a JSON file as shown here. However, the results for string values contain the "double-quotes" as expected, as shown below:
$ cat json.txt | jq '.name' "Google" How can I pipe this into another command to remove the ""? so I get
$ cat json.txt | jq '.name' | some_other_command Google What some_other_command can I use?
1 Answer
Use the -r (or --raw-output) option to emit raw strings as output:
jq -r '.name' <json.txt 13