4 ms·
Then pipe it into jq [1] to query parameters or build up a formatted string. Or pipe it into rq [2] to convert the format to yaml, toml etc. [1]: https://sted
by ducktective 4y ago
Then pipe it into jq [1] to query parameters or build up a formatted string.
Or pipe it into rq [2] to convert the format to yaml, toml etc.
[1]: https://stedolan.github.io/jq/tutorial/ https://stedolan.github.io/jq/tutorial/
[2]: https://github.com/dflemstr/rq#format-support-status https://github.com/dflemstr/rq#format-support-status
- asicsp 4y agoThere's also https://github.com/TomWright/dasel https://github.com/TomWright/dasel (supports JSON, TOML, YAML, XML and CSV)
- samuell 4y agoI 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.
- ddulaney 4y agoWhat do you mean by conditional-based editing? I've found its language to be pretty concise and readable, especially with the // operator.
- samuell 4y agoDoing 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.
- kbrazil 4y agoHi 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 https://github.com/kellyjonbrazil/jello