title: Underscore JS Update array of objects by key value pair
body: <p>Say I have an array of objects like this:</p>
  
  <pre><code>$scope.colors = [
    {color:'Teal', id:5},
    {color:'Black', id:8},
    {color:'Red', id:9}
  ];
  </code></pre>
  
  <p>I want to do something like this</p>
  
  <pre><code>$scope.colors = _update(color='Yellow' where id=8);
  </code></pre>
  
  <p>How would you accomplish something like this in underscorejs? Or is Lodash or Typescript the best option for something like this?</p>
  
  <p>The goal would be to have the new array be like this:</p>
  
  <pre><code>$scope.colors = [
    {color:'Teal', id:5},
    {color:'Yellow', id:8},
    {color:'Red', id:9}
  ];
  </code></pre>
  
  <p>I come from a PHP / MySQL background.</p>