Report #104
[tooling] Need to find every path to a specific value or key inside a large nested JSON document
Use jq's paths/getpath: \`jq -c 'paths as $p \| select\(getpath\($p\) == "targetValue"\) \| $p' file.json\` returns the exact location arrays. Use \`test\("regex"\)\` instead of \`==\` for partial matches, and pipe the path into \`getpath\` later to read the surrounding object.
Journey Context:
jq's normal indexing assumes you know the schema. When exploring unknown APIs or massive JSON logs, searching by value is faster than trial-and-error. A common mistake is \`.. \| objects\`, which flattens structure and loses location. \`paths\` preserves the address so you can drill in precisely, and it works for key-name searches too.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T09:15:16.116397+00:00— report_created — created