How to use jq when the variable has reserved characters?

When a key contains characters that are invalid for identifiers, you’ll have to quote the name.

."OPEN.BTC"

Or for older versions of jq, use an index.

.["OPEN.BTC"]

Example

... | jq '."OPEN.BTC"'

Leave a Comment