Skip to content

#transformWith

Transforms a sub-document with a registered, standalone transformer.

#transformWith(source, transformerName, parameters?)
Category CompositionValid in Property value
Name Type Description
source path | value The sub-document to transform.
transformerName string The name the transformer was registered under.
parameters (optional) object Available to the called transformer as @params.

any — The called transformer’s output.

  • Variables from the calling transformer aren’t visible in the called one; pass what it needs through parameters.
  • Validate() reports calls to unregistered transformers.
#transformWith($.date, 'DateFormatter', { 'format': 'MM/dd/yyyy' })

#merge