jq — JSON Processing
JSON processing with jq across 9 disciplines. Each discipline is a directory — add sub-pages as it grows without restructuring. All commands copy-paste-runnable on Arch Linux.
Disciplines
| Discipline | Description |
|---|---|
Keys, dot access, nested paths, raw output (-r), compact (-c), iterators, pipes |
|
select, test, has, type checks, regex filtering, compound conditions, contains, any/all |
|
Build JSON from shell, --arg/--argjson, object construction, to_entries/from_entries, merge |
|
@csv, @tsv, @html, @json, @base64, @uri, string interpolation, join, split |
|
Slurp (-s), group_by, sort_by, unique_by, min_by/max_by, add, length |
|
ip -j, nmcli, systemctl, ss, journalctl, pacman — system JSON queries |
|
curl | jq pipelines, pagination, authentication, error handling, multi-source joins |
|
map, reduce, recurse, walk, path expressions, env/$ENV, string transforms |
|
Null handling, string vs number, empty vs null, try-catch, shell quoting, operator precedence |
See Also
-
jq Sysadmin — operational patterns
-
jq Text Processing — fundamentals
-
yq — YAML counterpart (jq-compatible syntax)
-
jq Favorites — curated one-liners