title: Updating an array of objects in javascript
body: <p>I have an array of javascript objects like the following:</p>
  
  <pre><code>var food = [
      {id: 1, name: 'Apples', owned: true },
      {id: 2, name: 'Oranges', owned: false },
      {id: 3, name: 'Bananas', owned: true }
  ];
  </code></pre>
  
  <p>Then I receive another array with the following data:</p>
  
  <pre><code>var newFood = [
      {id: 1, name: 'Peas'},
      {id: 2, name: 'Oranges'},
      {id: 3, name: 'Bananas'},
      {id: 4, name: 'Grapefruits'}
  ];
  </code></pre>
  
  <p>How can I update the previous <code>food</code> array with the new information in <code>newFeed</code>, <em>without</em> overwriting the original <code>owned</code> property, while adding an <code>owned: false</code> to any new object?</p>
  
  <p>Keep in mind this is plain javascript, not jQuery. </p>