mergeDeep
Deep-merge multiple objects.
Inputs
Any non-complex objects.
Return
Returns a new object with the merged properties.
Limitations
- Provided objects will not be changed.
- Arrays inside the object will not merge. They will be overwritten.
- Objects cannot be complex.
Example
const o1 = {
"a": 1,
"b": 2
}
const o2 = {
"c": 3,
"d": 4,
"e": {
f: 5
}
}
const merged = fyzUtils.mergeDeep(o1, o2);
const merged1 = merged.a;
const merged2 = merged.e.f;
No Comments