Tools - jq - a lightweight and flexible command-line JSON processor

in «tools» by Michael Beard
Tags: , , , , , ,

It has some good stuff. I ran across it as I was looking at viewjrnl, a different viewer for jrnl (it doesn't work like it should, or I'd be writing about it instead). Anyway, the main tool it used was jq.

jq processor:

jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.

It seems to work pretty well. Along the lines of awk and not too hard to pick up. Still not too sure about the colors, but ... It does it stuff pretty well.

Not listed on the site above, but you can install it on Mac with:

brew install jq

It needs jq version 1.6+ (which should be good, as that was the stable version right now, today).

Where I'm actually using this (both of these are in ~/.mike/my_setup/bin:

  • j2md
  • j2rich

This shows how it can be used. Note: should make sure that one or both of these are available for showing how I do this.