title: Update Array containing objects using spread operator
body: <p>I have an array containing objects in javascript / typescript. </p>
  
  <pre><code>let array = [{id:1,name:'One'}, {id:2, name:'Two'}, {id:3, name: 'Three'}]
  </code></pre>
  
  <p>How can I update name of the second element (with id 2) and copy the array to a new array using javascript spread (...) operator?</p>