Logical Operators
Last updated
Was this helpful?
Logical operators can be used in conjunction with #if statements and other operators to perform logical checks.
{{$and arg1 arg2 ...}}
Returns true if all arguments evaluate to true
Arguments
arg1
1st argument to evaluate
arg2
2nd argument to evaluate
...
Remaining arguments to evaluate
Returns
(Boolean)
Example
This example checks if the qty is greater than 5 and the amount is less than 200
{{$and ($gt qty 5) ($lt amount 200) }}
{
"amount": 150,
"qty": 4
}true
{{$or arg1 arg2 ...}}
Returns true if any of the arguments evaluate to true
Arguments
arg1
1st argument to evaluate
arg2
2nd argument to evaluate
...
Remaining arguments to evaluate
Returns
(Boolean)
Example
This example checks if the qty is greater than 5 or the amount is less than 200
{{$or ($gt qty 5) ($lt amount 200) }}
true
Last updated
Was this helpful?
Was this helpful?
{
"amount": 500,
"qty": 4
}