Skip to main content

Quickstart

The simplest way to use Datadance is with the transform function.

Basic example​

When you call transform, you provide your data (input), the operations to perform (transforms), and how to merge the result (settings).

{
"name": "Alice",
"score": 85
}
Transform structure

Each transform is an object with exactly one key. The key is the output field name, and the value is either a MozJexl expression string or an array of nested transforms.

Merge methods​

The merge_method setting controls how the output is combined with the input:

MethodBehaviour
overwriteTransformed fields replace matching input keys. Unchanged input fields are preserved.
preserveOriginal input is returned as-is. Transformed fields are nested under a transforms key.
transforms_onlyOnly transformed fields are returned. All input data is discarded.

Using DDS syntax​

Instead of JSON, you can write transforms in Datadance Syntax (DDS), a YAML-like format:

name: upper(input.name)
score: input.score + 15

Interactive Playground​

Try it live in the Playground — edit input, write transforms, and see results instantly.