01 / 02
Condition operators
Reference for all condition operators used in mock API rules.
Comparison operators
| Operator | Description | Example |
|---|---|---|
| eq | Equal | status eq "active" |
| neq | Not equal | type neq "admin" |
| gt | Greater than | amount gt 100 |
| gte | Greater than or equal | count gte 5 |
| lt | Less than | price lt 50 |
| lte | Less than or equal | quantity lte 10 |
String operators
| Operator | Description |
|---|---|
| starts_with | String starts with value |
| ends_with | String ends with value |
| contains | String contains value |
| matches | Matches regex pattern |
Array operators
| Operator | Description |
|---|---|
| in | Value is in array |
| not_in | Value is not in array |
| is_empty | Array is empty |
| is_not_empty | Array is not empty |
Existence operators
| Operator | Description |
|---|---|
| exists | Field exists and is not null |
| not_exists | Field doesn't exist or is null |
| type_is | Check value type (string, number, boolean, array, object) |
Compound operators
| Operator | Description |
|---|---|
| and | All conditions must be true |
| or | At least one condition must be true |
| not | Negate a condition |