Hacker News new | ask | show | jobs
by samuell 1321 days ago
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.
2 comments

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

What do you mean by conditional-based editing? I've found its language to be pretty concise and readable, especially with the // operator.
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.