Reputation: 13735
I'd like to just print a
. I don't find how to do so. Could anybody let me know how to do it? Thanks.
$ jq '.' <<< '"a"'
"a"
Upvotes: 0
Views: 4061
Reputation: 338
Use the --raw-output
/-r
flag.
From the documentation:
With this option, if the filter’s result is a string then it will be written directly to standard output rather than being formatted as a JSON string with quotes. This can be useful for making jq filters talk to non-JSON-based systems.
Upvotes: 4