Start Here

Commander jq is a weekly newsletter about the jq command-line tool. One filter per issue, worked through line by line.

โ€‹

Every issue answers a question from the Commander's logbook โ€” which ships still have cargo space?, which port pays most for iron? โ€” using data from a space-trading API. Nested arrays, response envelopes, pagination: the shapes that make jq hard in the first place.

Get the data

Every example runs against the same JSON files. Download them once they are available and follow along:

โ€‹

jq '.data[] | select(.cargo.capacity > .cargo.units) | .symbol' ships.json

If that line makes sense to you, you already know more jq than most. If it doesn't, that's what the newsletter is for.

โ€‹

Who this is for

Developers, ops people, anyone who works with JSON APIs and keeps pasting jq snippets from Stack Overflow without knowing why they work.

โ€‹