Compound Predicates
Compound predicates let you check multiple properties of each element when using any or all quantifiers. Instead of checking a single value, you can test combinations of properties using and/or logic.
Basic Syntax
Section titled “Basic Syntax”Use where (or satisfies) followed by parenthesized sub-conditions. Each sub-condition starts with its to refer to the current element’s property:
any __items__ of **Order**
where (its __status__ is equal to "shipped"
and its __quantity__ is greater than 0)Matching Multiple Properties
Section titled “Matching Multiple Properties”Check that at least one array element matches all specified conditions:
Interactive Example
The Widget item matches both conditions (status = “ready” AND quantity > 0), so any returns true.
Non-Matching
Section titled “Non-Matching”When no element satisfies all sub-conditions, the result is false:
Interactive Example
Neither element matches both conditions simultaneously.
OR Logic
Section titled “OR Logic”Use or between sub-conditions to match elements that satisfy any of the criteria:
Interactive Example
Cross-Object References
Section titled “Cross-Object References”Sub-conditions can reference properties from other objects using the __prop__ of the **Selector**:
Interactive Example
This checks each grant against the request’s own action and resource properties.
Empty Arrays
Section titled “Empty Arrays”Compound predicates follow the same empty-array rules as regular quantifiers:
any ... where (...)over an empty array returnsfalseall ... where (...)over an empty array returnstrue
Synonym: Satisfies
Section titled “Synonym: Satisfies”You can use satisfies as a synonym for where:
any __items__ of **Order**
satisfies (its __status__ is equal to "shipped"
and its __quantity__ is greater than 0)Both forms are identical in behavior.
Combining with Dynamic Lookup
Section titled “Combining with Dynamic Lookup”Compound predicates are particularly powerful when combined with dynamic key lookups. See Platform RBAC for the current platform access model.
Summary
Section titled “Summary”| Syntax | What it does |
|---|---|
any ... where (its __prop__ op value) | At least one element matches the compound condition |
all ... where (its __prop__ op value) | Every element matches the compound condition |
its __prop__ | Refers to a property of the current array element |
the __prop__ of the **Obj** | Cross-reference to another object (right side) |
and / or | Combine multiple sub-conditions |
Related
Section titled “Related”- Quantifiers —
anyandallbasics - Dynamic Key Lookup — resolve property values as keys
- Platform RBAC — platform roles, ownership, and access behavior