News for hackers. Stuff that matters.
Re:jq 1.7 released by cryptonector on Wednesday September 06, 2023 @10:10PM (#37413884)
jq can be used trivially to approach gron-like output:

  jq -r 'paths(scalars) as $p | getpath($p) | "\($p|join(".")) = \(.)"'
See elsewhere in this subthread for a full gron implementation in jq.
Re:jq 1.7 released by nikau on Wednesday September 06, 2023 @10:37PM (#37414075)
'Trivially'
Re:jq 1.7 released by cryptonector on Thursday September 07, 2023 @12:24AM (#37414747)
Start with `jq -c 'paths(scalars)` -- that's pretty trivial.
Re:jq 1.7 released by sah2ed on Thursday September 07, 2023 @05:43AM (#37416664)
I think parent is referring to the habit of technically inclined folks of using "trivially" similar to words like "simply" and "just" [0][1] in a way that assumes too much about what the reader already knows.

[0] https://www.parkersoftware.com/blog/stop-using-simply-in-tec...

[1] https://news.ycombinator.com/item?id=35759449

Re:jq 1.7 released by cryptonector on Thursday September 07, 2023 @11:03AM (#37419960)
Or maybe I'm trying to whet one's appetite for learning the thing by showing a relatively simple expression that demonstrates the power of the language.