title: Replacing objects in array
body: <p>I have this javascript object:</p>
  
  <pre><code>var arr1 = [{id:'124',name:'qqq'}, 
             {id:'589',name:'www'}, 
             {id:'45',name:'eee'},
             {id:'567',name:'rrr'}]
  
  var arr2 = [{id:'124',name:'ttt'}, 
             {id:'45',name:'yyy'}]
  </code></pre>
  
  <p>I need to replace objects in <strong>arr1</strong> with items from <strong>arr2</strong> with same <strong>id</strong>.</p>
  
  <p>So here is the result I want to get:</p>
  
  <pre><code>var arr1 = [{id:'124',name:'ttt'}, 
             {id:'589',name:'www'}, 
             {id:'45',name:'yyy'},
             {id:'567',name:'rrr'}]
  </code></pre>
  
  <p>How can I implement it using javascript?</p>