Skip to content

Comparison Operators

Comparison operators check numeric values and equality.

__value__ of **Object** is greater than 100

Interactive Example

Policy Rule
Test Data (JSON)

Also written as is at least:

__score__ of **Student** is greater than or equal to 60
__score__ of **Student** is at least 60

Interactive Example

Policy Rule
Test Data (JSON)
__age__ of **Child** is less than 13

Interactive Example

Policy Rule
Test Data (JSON)

Also written as is no more than:

__weight__ of **Package** is less than or equal to 30
__weight__ of **Package** is no more than 30

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)

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)

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)
OperatorAliasesCase-sensitive
is greater thann/a
is greater than or equal tois at leastn/a
is less thann/a
is less than or equal tois no more thann/a
is equal tois the same as, is likeNo
is exactly equal tois exactlyYes
is not equal tois not the same asNo