jq — a lightweight and flexible command-line JSON 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
grep and friends let you play with text.
jq is written in portable C, and it has zero runtime dependencies.
jq can mangle the data format that you have into the one that you want with very little effort…” (link)
Check out the tutorial here.
You can also use jq to pretty print an ugly JSON file:
cat ugly_one_liner.json | jq '.'