Skip to content

#eval

Evaluates an arbitrary expression, either from a path or literal value, and returns the result.

#eval(expression)
Category Control flowValid in Property name, Property valueUnsafe requires WithUnsafeAllowed
Name Type Description
expression path | string Jolt expression text to evaluate.

any

  • #eval can execute any expression, including ones with unwanted side effects or security implications. Use it only with trusted input. Enable it with WithUnsafeAllowed on JoltOptions.
#eval('1 + 2 == 3')