Pretty-print and query JSON

Bash

jq for the common cases: reformat, pick a path, filter an array, and reshape.

jq . response.json
jq -r '.items[].name' response.json
jq '[.items[] | select(.active)] | length' response.json
jq '{ id, name: .title }' response.json

More in Text Processing

Random picks