Comparison Operators
Comparison operators check numeric values and equality.
Greater Than
Section titled “Greater Than”__value__ of **Object** is greater than 100Interactive Example
Policy Rule
Test Data (JSON)
Greater Than or Equal To
Section titled “Greater Than or Equal To”Also written as is at least:
__score__ of **Student** is greater than or equal to 60
__score__ of **Student** is at least 60Interactive Example
Policy Rule
Test Data (JSON)
Less Than
Section titled “Less Than”__age__ of **Child** is less than 13Interactive Example
Policy Rule
Test Data (JSON)
Less Than or Equal To
Section titled “Less Than or Equal To”Also written as is no more than:
__weight__ of **Package** is less than or equal to 30
__weight__ of **Package** is no more than 30Equal To
Section titled “Equal To”Also written as is the same as and is like. String comparisons are case-insensitive:
__status__ of **User** is equal to "active"
__role__ of **User** is the same as "admin"Works with strings, numbers, and booleans:
Interactive Example
Policy Rule
Test Data (JSON)
Exactly Equal To (Case-Sensitive)
Section titled “Exactly Equal To (Case-Sensitive)”Use is exactly or is exactly equal to when the comparison must be case-sensitive:
__code__ of **Token** is exactly "Bearer abc123"
__code__ of **Token** is exactly equal to "Bearer abc123"Interactive Example
Policy Rule
Test Data (JSON)
The same value with different casing will fail:
Interactive Example
Policy Rule
Test Data (JSON)
Not Equal To
Section titled “Not Equal To”Also written as is not the same as:
__status__ of **User** is not equal to "banned"
__role__ of **User** is not the same as "guest"Interactive Example
Policy Rule
Test Data (JSON)
Summary
Section titled “Summary”| Operator | Aliases | Case-sensitive |
|---|---|---|
is greater than | — | n/a |
is greater than or equal to | is at least | n/a |
is less than | — | n/a |
is less than or equal to | is no more than | n/a |
is equal to | is the same as, is like | No |
is exactly equal to | is exactly | Yes |
is not equal to | is not the same as | No |