Skip to content

Selectors

Selectors identify which JSON object a rule evaluates. They are wrapped in double asterisks: **Name**.

A selector maps to a top-level key in the JSON data:

**Person**    →  data.Person
**User**      →  data.User
**Order**     →  data.Order

Selectors can contain spaces:

**driving test**  →  data["driving test"]

Use dot notation to reference nested objects:

**user.profile**        →  data.user.profile
**driving test.theory** →  data["driving test"].theory

Interactive Example

Policy Rule
Test Data (JSON)

A rule can reference multiple selectors. This is useful for comparing data across objects:

A **Application** gets approved
if __age__ of **Applicant** is greater than 18
and __score__ of **CreditCheck** is greater than 700.

Each selector must exist as a key in the provided data:

{
"Applicant": { "age": 25 },
"CreditCheck": { "score": 750 }
}

Interactive Example

Policy Rule
Test Data (JSON)

Selector names are case-insensitive**Person**, **person**, and **PERSON** all refer to the same object in your data. The selector is a reference used to look up an object, not a value being compared.

Property value matching is case-insensitive by default. It is only case-sensitive when using is exactly or is exactly equal to.

Rules start with A, An, or The before the selector. These are required syntax but don’t affect evaluation:

A **Person** gets approved ...
An **Application** is valid ...
The **ticket** can still increase priority ...