jq
I rediscovered jq the other day, a little command line tool to format, read, and transform JSON from the command line.
Jq falls into one of my favorite categories of tools: the "simple and do one thing good" category—the Unix philosophy at its finest.
Pipe any JSON to jq
. The first thing you'll notice is the added syntax highlighting.
Then, you can use a path syntax to query the JSON object.
The path syntax supports arrays and deeply nested objects, and can even map data with a pipe operator.
Installing jq on a Mac is as easy as brew install jq
. Read the docs for further instructions and a detailed explanation of the path syntax.