title: Update values from one object to another in node JS
body: <p>I have two JSON objects as follows.</p>
  
  <pre><code>var j1 = {name: 'Varun', age: 24};
  var j2 = {code: 'NodeJS', alter: 'C++'}
  </code></pre>
  
  <p>I need to update JSON j1 with j2.</p>
  
  <p>Desired output</p>
  
  <pre><code> {name: 'Varun', age: 24, code: 'NodeJS', alter: 'C++'};
  </code></pre>
  
  <p>Is there any inbuild function in <code>NodeJS</code> to do this, instead of writing our own code.</p>
  
  <p>Thanks and Regards,</p>
  
  <p>Varun</p>