Object Transformer (ObjectTransformer)

Reshape and combine data from previous steps into a new JSON structure. ObjectTransformer is the perfect place for last-minute data transformations, merges, or reformatting before returning results to the user or feeding them into a subsequent step.

Unlike other steps, ObjectTransformer doesn’t have a parameters object — it uses a result field instead, which is processed with the Flow Language.

Parameters

resultobjectrequired

The JSON structure you want to build or transform. Can contain JSON Path references ($.results.someStep.field), and operators like @Map, @Extend, @Index, @Format, and @Replace. This is processed via the same Flow Language used everywhere else.

Example

{
  id: 'finalResult',
  type: 'ObjectTransformer',
  result: {
    '@Extend': '$.results.objectGeneratorStep',
    info: {
      modelUsed: '$.results.myTrainingStep.id',
      images: '$.results.imageStep.images',
    },
  },
}

This does three things:

  1. @Extend merges the entire object from objectGeneratorStep into the final result.
  2. modelUsed pulls the training ID from a previous step.
  3. images references the image results from another step.

The output looks like:

{
  "someField": "original data from objectGeneratorStep",
  "anotherField": 42,
  "info": {
    "modelUsed": "uuid-of-the-model",
    "images": [{ "url": "..." }, { "url": "..." }]
  }
}

Using @Map for array transformations

{
  id: 'reshapedData',
  type: 'ObjectTransformer',
  result: {
    mergedStuff: {
      '@Extend': '$.results.stepA',
    },
    newArray: [
      [
        '@Map($.results.stepB.arrayField)',
        {
          title: '$$.title',
          desc: '$$.description',
        },
      ],
    ],
  },
}

Billing: ObjectTransformer is charged at $0.01 per invocation — a flat fee regardless of data size.

Common use cases

  • Final assembly — combine results from multiple steps into one object for your UI’s results widget.
  • Data filtering — pick only the fields you need from a complex prior step.
  • Restructuring — produce a simpler shape for a subsequent Zipper step or API consumption.
  • Chaining — use multiple ObjectTransformer steps for complex transformations broken into smaller, readable chunks.

Best practices

  • Keep it readable — break complex transformations into multiple steps rather than one giant result object.
  • Use @Extend for merging — it’s cleaner than manually copying every field from a prior step.
  • Test with simple data first — verify your Flow Language expressions work on small inputs before scaling up.
  • Check the Flow Language reference for the full list of operators and examples.

Last updated on March 19, 2026