Skip to main content

Unary Operators

Example The exclamation mark negates the boolean that appears next to it.

Binary Operators

Comparisons

A note about in The in operator can be used to check for a substring: "Cad" in "Ron Cadillac", and it can be used to check for an array element: "coarse" in ['fine', 'medium', 'coarse']. However, the == operator is used behind-the-scenes to search arrays, so it should not be used with arrays of objects. The following expression returns false: {a: 'b'} in [{a: 'b'}].

Ternary operator

Conditional expressions are used to check if the first segment returns a correct value. If that’s the case, the value in the next segment is applied. Otherwise, the other value is applied. If the next segmeent is missing, the test result itself will be used instead.

Native Types

Groups

Parentheses work just how you’d expect them to:

Identifiers

Access variables in the context object by just typing their name. Objects can be accessed with dot notation, or by using brackets to access a dynamic property name. Example context:

Functions

In JEXL, common built-in functions are readily available, but also functions library is extended with lodash functions. You can use lodash functions from this link. Additionally, you can read our documentation on JEXL to learn more about these functions. Example Check out the JEXL codes below: Find Min
Reverse Array
Check Equal
Add Elements To Array
Get Last Element of Array