#eval
Evaluates an arbitrary expression, either from a path or literal value, and returns the result.
#eval(expression)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
expression |
path | string |
Jolt expression text to evaluate. |
Returns
Section titled “Returns”any
#evalcan execute any expression, including ones with unwanted side effects or security implications. Use it only with trusted input. Enable it withWithUnsafeAllowedonJoltOptions.
Examples
Section titled “Examples”Evaluate expression text
Section titled “Evaluate expression text”#eval('1 + 2 == 3')