title: Is there a lodash function or a 'lodash way' to do a conditional _.map?
body: <p>So basically, I have an array of objects and I'd like to update only the objects in the array that satisfy a condition. I want to know if there's like a good functional way of solving that problem. Right now I'm using lodash. Here's and example:</p>
  
  <pre><code>var things = [
      {id: 1, type: "a", value: "100"}, 
      {id: 2, type: "b", value: "300"}, 
      {id: 3, type: "a", value: "100"}
  ];
  var results = _.map(things, function (thing) { 
      if(thing.type === "a") {
          thing.value = "500";
      } 
      return thing;
  });
  // =&gt; results should be [{id: 1, type: "a", value: "500"}, {id: 2, type: "b", value: "300"}, {id: 3, type: "a", value: "500"}];
  </code></pre>