Predicate Queries
Use JSONata Predicate Queries at any location path; the selected items can be filtered using a predicate - <expr> where expr evaluates to a Boolean value. With that, you can select values from the array based on the specific type set as the predicate expression.
Result | Expression |
Evaluate if true and show the name | =@ctx.datasources.mydata[title='Nurse' and color='blue'].name |
Be careful when using complex expressions, such as expressions that iterate one datasource across another, as your solution performance could become slower. To avoid this, try to use the datasource queries to get the desired result rather than an expression.

In this example the expression is used to show the name of the nurse whose color is blue.
See the full code sample in GitHub.