You can use JSONata Functional programming to compare values or display data based on certain conditions. You can quickly make any logical statements, and based on the result, you can perform different actions.
Determine if the value is bigger or smaller than a certain number
"=@ctx.datasources.mydata.number2 > 10 ? 'Number is bigger':'Number is lower'"
="<div style='font-size: 40px'>Welcome on board <b>" & @ctx.datasources.html.name & "</b> - " & @ctx.datasources.html.email & "</div>
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.
In this example we determine if the value for entity.field is bigger or smaller that 10.
This example shows how to write variables in HTML content.
In this example, we use the notation in which we select the instanceId of our component from the components, and extract the selected from the state of the component, then choose the required value. For example id, name,...