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.

Configuration

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.



Examples and code snippets 

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

expression.jigx




Updated 31 Jul 2023
Doc contributor
Did this page help you?