Select, put and delete data from JSON, TOML, YAML, XML and CSV files

  • Reminds me of https://github.com/johnkerl/miller which is also a go based tool cloning features from tools like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON

  • I think I prefer yq's[1] syntax for manipulating and updating fields.

    Combined with yj[2] you can also get TOML and HCL support, but not CSV.

    It's certainly not because there's a lack of these tools :p

    [1]: https://github.com/mikefarah/yq

    [2]: https://github.com/sclevine/yj

  • I remember looking through XPath and wondering why no one had converted as much of it as possible to a generic path language for any tree-based data format, which JSON, TOML, YAML, and XML are.

    XPath was the best of the XML standards. Well, it helps that the language wasn't xml unlike XSLT and others.

  • undefined

  • Can this or anything else flatten arrays of JSON objects to CSV?

  • The "delete" example on the readme is a bit odd, since it seems to suggest that you need to specify the value to delete as well as the path. The equivalent in the documentation does not have this problem.

  • That's a fascinating concept. Is there anything similar for INI? Such a tool for ini could help in automatically changing configuration files for software which is most often configured by ini files.

  • [flagged]