Expressions
Aggregation
3min
Use JSONata aggregation to return the results of values to find a maximum, minimum, or average value in an array.
Result | Expression |
Maximum | =$max(@ctx.datasources.mydata.array) |
Minimum | =$min(@ctx.datasources.mydata.array) |
Sum | =$sum(@ctx.datasources.mydata.array) |
![Aggregated expression Aggregated expression](https://images.archbee.com/x7vdIDH6-ScTprfmi2XXX/X11pn0BVv4LsvZydrxLVL_img6602iphone13blueportrait.png?format=webp)
Aggregated expression
In this example static data is agregated in a component.enity to show the result in the entity field.
See the full example code sample in GitHub.