3 ms·
> However, some things never stick in my head, nor my fingers, and I have to google them every time. jq is one of these. However powerful jq may be, the commen
by ur-whale 5y ago
> However, some things never stick in my head, nor my fingers, and I have to google them every time. jq is one of these.
However powerful jq may be, the comment above, which has exactly been my experience with jq, summarizes quite nicely the biggest hurdle with this tool.
99% of my jq use looks like this:
cat file.json | jq . | <regular list of unix filters>
and the remaining 1% is straight cut and paste from google / stackoverflow that may or may not end up doing what I want.
jq's DSL is inscrutable
- enriquto 5y agoyou may enjoy one of the various "gron" commands, that format json as a list of lines, with one field per line, and is very easily greppable, seddable, and awkable.
- ur-whale 5y ago>you may enjoy one of the various "gron" commands This is the second time someone recommended this on HN, so this time, I did go and have a look. Really nice indeed, thanks for the tip.
- buzzwords 5y agoI have to use jq once in a blue moon which means I have to rely on trial and error, because I have forgotten all that I leanred last time.