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 examples and code snippets 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 datasources mydata type datasource static options data \ name jane stevens title doctor email jane\@first com number 0 64734 number2 12 color blue time '2021 11 07t15 07 54 972z' array \[5,1,2,3,7,9] \ name arthur marks title nurse email arthur\@first com number 0 98 number2 10 color red time '2021 11 07t15 07 54 972z' array \[5,1,2,3,7,9] \ name merley shanks title nurse email merley\@first com number 0 43 number2 9 color blue time '2021 11 07t15 07 54 972z' array \[5,1,2,3,7,9] children \ type component entity options children \ type component entity field options label predicate expression value =@ctx datasources mydata\[title='nurse' and color='blue'] name