title: Replace or update object in array when property matches
body: <p>I am using Vuejs to build a data filtering component. I am storing the selected filter options in an array that looks like this:</p>
  
  <pre><code>[{ "key": "payment", "name": "Payment", "options": [ "paid", "pending" ] }, { "key": "status", "name": "Order Status", "options": ["unfulfilled"] } ]
  </code></pre>
  
  <p>When a filter option is selected or deselected I want to update this array of objects. i.e If we remove the 'pending' option it would look like this:</p>
  
  <pre><code>{ "key": "payment", "name": "Payment", "options": [ "paid"]} ...
  </code></pre>
  
  <p>Is there a way in JS to push the updated options where the key matches, or do I need to remove the existing object and replace with the new one?</p>