News for hackers. Stuff that matters.
Re:jc – JSONifies the output of many CLI tools by samuell on Thursday November 03, 2022 @09:14AM (#33450446)
I would wish for jq to be a really generic tool for working with structured data on the commandline, but I have a really hard time figuring out how to do e.g. conditional-based editing etc. Can't get my head around that, and don't find any info about it on the net. Seems even something that just supports SQL (upon JSON) would be better in this regard.
Re:jc – JSONifies the output of many CLI tools by ddulaney on Thursday November 03, 2022 @10:57AM (#33452005)
What do you mean by conditional-based editing? I've found its language to be pretty concise and readable, especially with the // operator.
Re:jc – JSONifies the output of many CLI tools by samuell on Friday November 04, 2022 @04:27AM (#33463496)
Doing editing only on selected "rows" or items in a structure, based on the values of other attributes in them. Similar to what you specify in the WHERE clause in SQL-statements.
Re:jc – JSONifies the output of many CLI tools by kbrazil on Thursday November 03, 2022 @11:40AM (#33452722)
Hi there - I'm the author of `jc`. I also created `jello`[0], which works just like `jq` but uses python syntax. I find `jq` is great for many things but sometimes more complex operations are easier for me to grok in python.

[0] https://github.com/kellyjonbrazil/jello