Last login: Thu 12 Nov 2026 on tty1
Archived edition.
Ten things the page says. Every one of them is on your machine right now — run the command above and check.
jq can transform JSON in various ways, by selecting, iterating, reducing and otherwise mangling JSON documents.[man]
For instance, running the command jq 'map(.price) | add' will take an array of JSON objects as input and return the sum of their "price" fields.[man]
jq can accept text input as well, but by default, jq reads a stream of JSON entities (including numbers and other literals) from stdin.[man]
Whitespace is only needed to separate entities such as 1 and 2, and true and false.[man]
One or more files may be specified, in which case jq will read input from those instead.[man]
The options are described in the [INVOKING JQ] section; they mostly concern input and output formatting.[man]
The filter is written in the jq language and specifies how to transform the input file or document.[man]
A jq program is a "filter": it takes an input, and produces an output.[man]
There are a lot of builtin filters for extracting a particular field of an object, or converting a number to a string, or various other standard tasks.[man]
Filters can be combined in various ways - you can pipe the output of one filter into another filter, or collect the output of a filter into an array.[man]
Read the page, then ask the command itself
Every command on the machine documents itself twice. Comparing the two is a habit that outlives any single page.
$ man 1 jq | head -40
$ jq --help 2>&1 | head -20
WHAT YOU SHOULD SEEThe top of the manual page, then the command's own built-in summary. The two often differ, and where they differ is worth noticing.
Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.
QUESTION 1 OF 5
Which term completes this line from the page? “jq can _____ JSON in various ways, by selecting, iterating, reducing and otherwise mangling JSON documents.”
From point 1 above.
QUESTION 2 OF 5
Which term completes this line from the page? “jq can accept text input as well, but by default, jq reads a stream of JSON entities (_____ numbers and other literals) from stdin.”
From point 3 above.
QUESTION 3 OF 5
Which term completes this line from the page? “One or more _____ may be specified, in which case jq will read input from those instead.”
From point 5 above.
QUESTION 4 OF 5
Which term completes this line from the page? “The filter is written in the jq language and _____ how to transform the input file or document.”
From point 7 above.
QUESTION 5 OF 5
Which term completes this line from the page? “There are a lot of builtin filters for _____ a particular field of an object, or converting a number to a string, or various other standard tasks.”
From point 9 above.
Answer all five to bank your points.
Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.
Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:
The Operator has a dispatch on jq(1),
and he files them for subscribers only. It is free.
Join the club, or read about
the series.
MOTD is a weekday reading of one manual page already installed on your own
machine. Every statement is quoted from that page or from the GNU info
documentation beside it, and every edition names the command that shows you
the source.
archive ·
the operator ·
about ·
podcast ·
Feline Union