Merge
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Merge

  • Dark
    Light
  • PDF

Given a list of objects, returns a single object that contains all unique key/value pairs from the source objects. If there are several objects that have the same key, the value will be taken from the last object in the list.

Function signature

MERGE(objects: Array) => Object
Parameter Description
Objects List of objects whose properties will be get

Examples

dog = {"name":"dog","weight":123,"a":1}
cat = {"name":"cat","weight":48,"b":2}
rat = {"name":"rat","weight":10,"c":3}
Formula Return value
MERGE([dog, cat, rat]) {"a":1,"b":2,"c":3,"name":"rat","weight":10}
MERGE([]) {}

Was this article helpful?

What's Next