4 ms·
Have only recently started using JQ, and it's absolutely brilliant. I'm on wsl2/Ubuntu - just pipe any Json content to it, and you get an easy to read colour ve
by sundvor 3y ago
Have only recently started using JQ, and it's absolutely brilliant. I'm on wsl2/Ubuntu - just pipe any Json content to it, and you get an easy to read colour version rather than your regular monotone output (which seems incompatible with my brain).
And you can then create queries to select certain keys - highly useful if you're dealing with monster documents, and customise the output of that (eg to reduce into just the info you need). Plus probably much more, but those are the features I've used so far. Big thanks to the Devs!
- beardyw 3y agoYes, with curl and jq you can do a lot. But every time I have to relearn the syntax.
- shepherdjerred 3y agojq is great! Just so you know, there are similar programs for many other languages, like yq [0]. Also, there are interactive `jq` prompts like `ijq` [1]. [0]: https://github.com/kislyuk/yq https://github.com/kislyuk/yq [1]: https://sr.ht/~gpanders/ijq/ https://sr.ht/~gpanders/ijq/
- tupolef 3y agoAnd there is also a rust clone of `jq`, `jaq` [1], which aims for correctness, performance and simplicity. I use it for the performance because there is a big startup time for `jq`, with `jaq` I can use it in scripts that are called every seconds in my status bar without delay. [1]: https://github.com/01mf02/jaq https://github.com/01mf02/jaq