Filter array items based on a boolean expression.
Section: Filters and Conditions
Select objects matching condition
bash
bash
echo '[{"name":"a","age":20},{"name":"b","age":35}]' | jq '.[] | select(.age >= 30)'Explanation
`select()` keeps only inputs that satisfy the condition.
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 Filters and Conditions