Search recursively for objects containing a field.
Section: Paths and Deep Updates
Find matching nested objects
bash
bash
echo '{"items":[{"name":"a"},{"child":{"name":"b"}}]}' | jq '.. | objects | select(has("name"))'Explanation
The recursive descent operator `..` is powerful for document-wide search.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Paths and Deep Updates