Convert string to json in jq
You can also do this:
jq -r '.response.text' | jq '.recordID'
Use fromjson
.
It parses a string to its appropriate json value. tojson
(and @json
) goes the other way around and takes a json value and converts it to a string.
So you could do this:
.response.text | fromjson.title