Skip to content
Advertisement

Tag: merge

How to merge two objects, overriding null values?

I’d like to merge two similar but not identical objects and override null values in one of them, if such exist. For example I’d have these two objects: And the effect of merge should be: In other words, the most important source of data in the merged object is obj2 but it lacks some properties […]

Advertisement