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
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.