Branch based on input values.
Section: Filters and Conditions
Conditional expression
bash
bash
echo '{"score":85}' | jq 'if .score >= 80 then "pass" else "fail" end'Explanation
jq supports full conditional branching with `if ... then ... else ... end`.
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