title: Find and remove first matching element in an array of Javascript objects
body: <p>Suppose I have an array:</p>
  
  <pre><code>    members = [
          {name: 'Anna', class: 'one'}, 
          {name: 'Bob', class: 'two'},  
          {name: 'Chuck', class: 'two'}];
  
      removed = members.myRemoveByClass('two');     //something like
  
      // removed is {name: 'Bob', class: 'two'} 
      // members is [{name: 'Anna', class: 'one'}, {name: 'Chuck', class: 'two'}]
  </code></pre>
  
  <p>I'm looking for something for <code>myRemoveByClass</code>. ES2015 is fine or using Lodash. The array will have been ordered already. <a href="https://stackoverflow.com/questions/25726066/equivalent-of-underscore-pluck-in-pure-javascript">None</a> of the <a href="https://stackoverflow.com/questions/10457264/how-to-find-first-element-of-array-matching-a-boolean-condition-in-javascript">questions</a> I've <a href="https://stackoverflow.com/questions/19590865/from-an-array-of-objects-extract-value-of-a-property-as-array">seen</a> quite <a href="https://stackoverflow.com/questions/10457264/how-to-find-first-element-of-array-matching-a-boolean-condition-in-javascript">match</a> what I'm <a href="https://stackoverflow.com/questions/21659888/javascript-find-and-remove-object-in-array-based-on-key-value">looking</a> for.   </p>