Filter items that satisfy two conditions.
Section: Boolean Logic
Logical AND
bash
bash
echo '[{"env":"prod","healthy":true},{"env":"dev","healthy":true}]' | jq '.[] | select(.env == "prod" and .healthy)'Explanation
Combine predicates with `and` and `or`.
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 Boolean Logic