When getting output from json apis and attempting to use them with other unix utilities, you often need just the value of a string without the surrounding quotes. Clearly i can do something like:
curl ... | jq .keypairs[$i].keypair.name | tr -d '"'
but it would be nice to be able to do:
curl ... | jq '.keypairs[$i].keypair.name | tovalue'
or something along those lines
alternatively it could be a comand line switch to print strings without quotes:
curl ... | jq -z .keypairs[$i].keypair.name
--raw-output / -r http://stedolan.github.io/jq/manual/#Invokingjq
ah thanks didn't see that one
Great, thanks ghost
Thanks @ghost !
awesome this helped me too thanks
Most helpful comment
--raw-output / -rhttp://stedolan.github.io/jq/manual/#Invokingjq