#merge
Deep-copies and merges two or more objects, with later values taking precedence.
#merge(object, ...objects)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
object |
path | object |
The base object. |
objects |
path | object |
One or more objects merged on top. |
Returns
Section titled “Returns”object
Examples
Section titled “Examples”Later values win
Section titled “Later values win”{ "base": { "a": 1, "b": 1 }, "overrides": { "b": 2 }}{ "result": "#merge($.base, $.overrides)"}{ "result": { "a": 1, "b": 2 }}