3 ms·
Would like to have a kind of "rosetta stone" where each of these examples is rewritten by passing the json to "gron" and then using the standard unix tools. I
by enriquto 7y ago
Would like to have a kind of "rosetta stone" where each of these examples is rewritten by passing the json to "gron" and then using the standard unix tools.
I guess some of the examples would be simpler than the jq solution.
- loeg 7y agoKudos for sharing "gron," I hadn't heard of that tool before and it looks quite useful: https://github.com/tomnomnom/gron https://github.com/tomnomnom/gron
- enriquto 7y agoFor a truly unix experience, filter the output of gron through this grep -Ev '({}|\[\])' | tr -d \; | cut -c 6- It will remove useless cruft that is added for the output to be valid javascript