Jexl Array

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Jexl Array

naveen reddy
Hi,

I have started using JEXL and my scenario is below,

x  = 10;
Some constants [10,20,30,40] may be in an array,

if x is in the above set, return *true* else *false*


Can anyone tell me how do I create JEXL expressions for the SQL like "IN"
statements ?


Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Jexl Array

henrib
This post was updated on .
Hi;
As mentioned in https://commons.apache.org/proper/commons-jexl/reference/syntax.html#Operators , the 'in' aka '=~' operator works with array (and collections).
The syntax is thus:  x =~ [10, 20, 30]
Cheers