Data Transformation

Expression

Use JavaScript expression to apply transformations on data or objects. An expression is any valid unit of code that resolves to a value.

Examples:

  • 1 + 2
  • [1, 2, 3].filter(x => x < 3)

Note: Lodash is available through the variable _.

Inputs

Field

Type

Description

context

This value should be a JSON-serializable value, which will be made available in the expression as $. This can be a hard-coded value, or composed from the workflow execution context using templating.

script [required]

string

A JavaScript expression which applies a transformation to your data. An expression usually contains one line of JavaScript code that can be reformatted into multiple lines. Variable assignments or multiple standalone operations are not allowed. Use $ to access Trigger or Steps data. Use _ to access Lodash.

default: $.WorkflowName.split('')

description

string

A description for the expression.

Outputs

Field

Type

Description

data [required]