jq is 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 sed
,
awk
, grep
and friends let you play with text.
jq is written in portable C, and it has zero runtime
dependencies. You can download a single binary, scp
it to a far away
machine of the same type, and expect it to work.
jq can mangle the data format that you have into the one that you want with very little effort, and the program to do so is often shorter and simpler than you'd expect.
Go read the tutorial for more, or the manual for way more.
Ask questions on stackoverflow using the jq tag, or on the #jq channel on Freenode.
jq 1.6 released. See installation options on the download page, and the release notes for details.
jq 1.5 released, including new datetime, math, and regexp functions, try/catch syntax, array and object destructuring, a streaming parser, and a module system. See installation options on the download page, and the release notes for details.
jq 1.5rc2 is available. Get it on the releases page.
jq 1.5rc1 is available. Get it on the releases page.
jq 1.4 (finally) released! Get it on the download page.
jq 1.3 released.