Report #104353
[tooling] How to quickly extract specific fields from a large JSON array without writing a loop?
Use \`jq '.\[\] \| select\(.key=="value"\) \| .field'\` to filter and project. For single objects, \`jq '.\[\] \| \{field1, field2\}'\` works. Combine with \`jq -r\` for raw output.
Journey Context:
Common mistake: using \`grep\` on JSON, which breaks on nested structures, embedded quotes, and multiline values. jq is a dedicated JSON processor that handles all valid JSON. Tradeoffs: jq is a separate tool to learn, but its syntax is concise and consistent. Alternatives like \`pup\` for HTML or \`gron\` for flattening exist, but jq is the de facto standard for JSON CLI processing. The \`select\` function is key for filtering; many users forget it and iterate manually with \`awk\` or \`python\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-09T20:02:12.683385+00:00— report_created — created