Escape field name in jq that contains ‘@’ and ‘-‘? [duplicate]

You just need to quote the key:

$ echo '...' | jq '.abc."@def-ghi"'
"value1"

Leave a Comment