Skip to main content

Map

Category: Transform
Node id: map

Applies a mapping operation to each item in an array: extract a field, apply a transform, or extract multiple fields

What it does​

  • Three map modes: field extraction, transform, multi-field extract
  • Built-in transforms: uppercase, lowercase, trim, length
  • Single-field and multi-field extraction from object arrays
  • Item count tracking in output

Use cases​

  • Extract patient IDs from a list of FHIR Patient resources
  • Normalize text fields to uppercase across clinical records
  • Project specific fields from complex data objects

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
datajsonYesArray of objects to map over

Output ports​

NameTypeRequiredDescription
resultjsonNoMap result: mapped array plus count and type-specific metadata (field, transform, or fields)
successbooleanNoWhether the map operation completed without error

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Map Typemap_typeenumYesfieldfield, transform, extractType of mapping operation
FieldfieldstringNoField name to extract from each item (required for field type)
TransformtransformenumNouppercaseuppercase, lowercase, trim, lengthTransformation to apply to each item (for transform type)
FieldsfieldsarrayNoList of fields to extract from each item (required for extract type)

Errors​

CodeDescription
UNSUPPORTED_MAP_TYPEThe specified map_type is not recognized
MISSING_FIELDField config is required for field map type
INVALID_DATAInput data is not a valid array

Runtime notes​

  • result.mapped is always an array — for field mode it contains scalar values, for extract mode it contains objects
  • Items that are not objects are silently skipped in field and extract modes (no error)
  • transform mode converts every item to a string before applying the transform (uppercase, lowercase, trim, length)
  • Use extract mode with a fields array to project multiple keys from each object

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

Something unclear? Send documentation feedback by email.