3 ms·
I also love gron, if nothing else to find the paths I need to use with jq later. But ChatGPT has genuinely solved my suffering writing jq, it does a pretty goo
by lathiat 3y ago
I also love gron, if nothing else to find the paths I need to use with jq later.
But ChatGPT has genuinely solved my suffering writing jq, it does a pretty good job. It even almost replaces gron, if you feed it an exmaple json and ask for jq, it gives you something. It usually needs a little adjusting but it gets me 90% of the way there and saves me a bit of time.
I rarely use it for much else but its a jq winner :)
- cryptonector 3y agojq 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.
- nikau 3y ago'Trivially'
- cryptonector 3y agoStart with `jq -c 'paths(scalars)` -- that's pretty trivial.
- sah2ed 3y agoI 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-tech-instructions/ https://www.parkersoftware.com/blog/stop-using-simply-in-tec... [1] https://news.ycombinator.com/item?id=35759449 https://news.ycombinator.com/item?id=35759449
- cryptonector 3y agoOr 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.