I have something like from jq filter execution
[
"sandbox1.blah.com"
]
null
[
"prod1.blah.com"
]
it's generated when I pipe the curl to | ./jq-linux64 .test[].dc1
when I do .test[].dc1[]
I get
"sandbox1.blah.com"
"prod1.blah.com"
jq: error (at
also how can I do so that output is without double quotes.
Thanks in advance
using []? to handle that, works
also how can I do so that output is without double quotes.
Use the -r option like this:
jq -r .test[].dc1[]
using []? to handle that, works
You saved my day.
Thank you!
jq -r '.[]?
Working for me
Most helpful comment
using []? to handle that, works