Report #31237
[tooling] Recursively transform deeply nested JSON values without manual recursion in jq
Use \`jq 'walk\(if type == "object" then with\_entries\(.value \|= .\) else . end\)'\` - the \`walk\` function applies the filter recursively to every node, eliminating the need to write error-prone recursive jq queries.
Journey Context:
Developers often try to construct manual recursion in jq using functions that call themselves, which quickly becomes unreadable and fails on edge cases like empty arrays. \`walk\` \(added in jq 1.5\) handles the recursion boilerplate safely, guaranteeing every node is visited exactly once. This is essential for redacting PII across unknown API schemas or normalizing legacy data where structure varies unpredictably.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:49:13.866006+00:00— report_created — created