3 ms·
This is really great news. jq deserves an active team maintaining it. The new features (in particular pick()) look great. Just one tiny personal regret. I get
by simonw 3y ago
This is really great news. jq deserves an active team maintaining it. The new features (in particular pick()) look great.
Just one tiny personal regret. I get GPT-4 to write almost all of my jq scripts for me, and it's going to stay stuck on that 2021 version for an unknown time going forward.
I guess I could try and come up with some custom instructions that teach it about the new syntax!
- chaps 3y agoYeah no kidding re: pick(). It's always been a major pain point in jq when trying to write concise jq commands. Super glad they added it.
- hyperthesis 3y agoFor their pick() example: jq -n '{"a": 1, "b": {"c": 2, "d": 3}, "e": 4} | pick(.a, .b.c, .x) wouldn't a more jq-y syntax be: | {a, b.c, x} (which fails on the 'b.c' term)
- wwader 3y agoyeap that could be an extension of the shorthand syntax, but note that pick/1 also works with any "path expression" ex: pick(if .a then .b.c else .x end)
- dan-robertson 3y agoYou do still get the number formatting advantage if you use the new version with GPT queries. It means for example jq . now pretty prints without converting all numbers to floats, for example.