Section: Boolean Logic

Logical OR

bash
bash
echo '[{"role":"admin"},{"role":"editor"}]' | jq '.[] | select(.role == "admin" or .role == "owner")'
Explanation

Great for whitelists and matching multiple states.

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
Logical AND
Filter items that satisfy two conditions.
OpenIn sheetbashsame section
Logical NOT
Invert a predicate.
OpenIn sheetbashsame section
Test membership with IN
Check whether a value appears in a stream.
OpenIn sheetbashsame section
Test regex match
Return true if a string matches a pattern.
OpenIn sheetbash1 tag match
Floor number
Round down to nearest integer.
OpenIn sheetbash1 tag match
Current Unix time
Get the current time as Unix epoch seconds.
OpenIn sheetbash1 tag match