title: How to merge nested objects in javascript
body: <p>Merging nested objects it overides.</p>
  
  <pre><code>let target = { cache: 
                {curUser:
                 { callingName: 'ch sairam', dateOfBirth: undefined, isTempDob: true, knowMarketPrefChange: true, email: 'sairamch3@gmail.com', gender: '',  livingIn: 'IN', uid: 'CrzpFL2uboaeGvMxXi5WQKSQsCr1', timeZone: undefined }, 
                 names: [ [Object] ],   minPrice: '2500', maxPrice: '50000', market: 'CA', foundLovedOne: false,  }
               }
  </code></pre>
  
  <pre><code>let source = { cache: 
                {curUser: 
                 { isTempDob: true, knowMarketPrefChange: false, timeZone: 'Asia/Kolkata' },
                 prefLanguage: 'en', market: 'IN',  minPrice: 2250, maxPrice: 45000, foundLovedOne: false, domainName: 'roo-fire.appspot.com', prodQueryPageNumber: 0, welcomeIntentShown: true }, 
                curContexts: [] }
  </code></pre>
  
  <pre><code> target = Object.assign({},target,source);
  </code></pre>
  
  <p>when print target it results</p>
  
  <pre><code>Object { cache: Object { curUser: Object { isTempDob: true, knowMarketPrefChange: false, timeZone: "Asia/Kolkata" }, prefLanguage: "en", market: "IN",   minPrice: 2250, maxPrice: 45000, foundLovedOne: false,  prodQueryPageNumber: 0, welcomeIntentShown: true }, curContexts: Array [] }
  </code></pre>
  
  <p>source override target,
  I want to get this results?</p>
  
  <pre><code>{ cache: 
                {curUser:
                 { callingName: 'ch sairam', dateOfBirth: undefined, isTempDob: true, knowMarketPrefChange: false, email: 'sairamch3@gmail.com', gender: '', prefMarket: 'CA', livingIn: 'IN', uid: 'CrzpFL2uboaeGvMxXi5WQKSQsCr1', timeZone:'Asia/Kolkata' }, 
                 prefLanguage: 'en',names: [ [Object] ], minPrice: '2250', maxPrice: '45000', market: 'CA', foundLovedOne: false, prodQueryPageNumber: 0, welcomeIntentShown: true },
                curContexts: [] }
  </code></pre>