Expressions
Predicate Queries
3min
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 | [email protected][title='Nurse' and color='blue'].name |
![Predicate queries Predicate queries](https://images.archbee.com/x7vdIDH6-ScTprfmi2XXX/pJL_aAds1bbqRl0w5trhY_qfbtw3l1pzojf6xyfwlvvimg0976iphone13blueportrait.png?format=webp)
Predicate queries
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.