Hello,
I would like to a field's value based on another field's value. I tried this:
jq '.[] | select(.[logged_in_link] | contains ("virtual") | .id' )
but it gives me error: jq: error: syntax error, unexpected $end, expecting ';' or ')' (Unix shell quoting issues?) at
.[] | select(.[logged_in_link] | contains ("virtual") | .id
How can I get the value? Thanks a lot
You probably meant something like this:
jq '.[] | select(.["logged_in_link"] | contains ("virtual")) | .id'
(Usually the error message is worth heeding.)
In future, please ask usage questions such as this at stackoverflow.com https://stackoverflow.com/questions/tagged/jq
Thank you.
It works like a charm!
Thanks a lot!
Most helpful comment
You probably meant something like this:
(Usually the error message is worth heeding.)
In future, please ask usage questions such as this at stackoverflow.com https://stackoverflow.com/questions/tagged/jq
Thank you.