function merger(objValue, srcValue, key, object, source, stack) {
switch (key) {
case 'keya':
case 'keyb':
case 'keyc':
return null
}
}
mergeWith({}, oldObj, newObj, merger)
I would like to skip merging when key is equal to some value. But the output from above code will have the output as {keya: null} when newObj has keya.
Can I skip the merge so that the key is not in the output?