Return true if any element satisfies a predicate.
Section: Array Basics
Check whether any item matches
bash
bash
echo '[{"active":false},{"active":true}]' | jq 'any(.[]; .active)'Explanation
`any()` is concise for boolean checks across collections.
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 Array Basics