- Built-in Functions
- merge
merge
Function
merge
takes an arbitrary number of maps or objects, and returns a single map
or object that contains a merged set of elements from all arguments.
If more than one given map or object defines the same key or attribute, then the one that is later in the argument sequence takes precedence. If the argument types do not match, the resulting type will be an object matching the type structure of the attributes after the merging rules have been applied.
Examples
The following example uses the expansion symbol (...) to transform the value into separate arguments. Refer to Expanding Function Argument for details.