Skip to main content
Version: Next

Merge Objects

Recursively merges keyed properties of source objects into the destination object

Description

Recursively merges keyed properties of source objects into the destination object. Array and plain object properties are merged recursively. Other objects and value types are overridden by assignment. Source objects are applied from left to right.

Example:

  • inputs

    • destination object = { "a": [{ "b": 2 }, { "d": 4 }] }
    • source object = { "a": [{ "c": 3 }, { "e": 5 }] }
  • outputs

    • result = { "a": [{ "b": 2, "c": 3 }, { "d": 4, "e": 5 }] }

Inputs

  • Destination Object (Object): The destination object
  • Source Object (Object): The source objects

Outputs

  • Result (Object): Merged object
  • Error Flow (Error Flow): Triggered by providing incorrect json string or object