February 20th, 2020
4:19 pm
Deep merging of JS objects

Posted under Angular & Web

I needed to do this to implement a configuration profile/configuration override pattern, whereby a configuration profile contained json configuration which would selectively override some configuration options by merging the profile into the overall configuration.

This post here discusses deep merging of objects, and gives examples such as this one, which I used as the basis of my implementation. I did not need or want to get into deep merging of arrays, which other answers discussed, and I did not want to involve lodash.

 

Comments Off on Deep merging of JS objects

Comments are closed.