mergeWith
mergeWith(T, V): ?
Keeps the target object intact, then appends to the target object any key-value pairs from the source where the key is not already in the target.
Transform
1
2
3
4
%dw 2.0
import mergeWith from dw::core::Objects
---
{a: true, b: 1} mergeWith {a: false, c: "Test"}
Output
1
{"a": false, "b": 1 , "c": "Test"}