Hey, this is probably answered somewhere already, but how can I get the following to work?
echo '{"json":"value"}' | jq > file
I use jq to format/validate JSON strings, and it's not always feasible to copy from a terminal.
Thanks
Use jq . instead of jq.
thanks, I figured it had to be something simple!
IHMO, in non interactive mode it would make sense to set -M and . filter by default
@rzr If we ever touch this again it will be to make a program (., whatever) an absolute requirement whether you're using pipes or ttys.
Most helpful comment
Use
jq .instead ofjq.