title: check if an object with a specific key value exists in an array of objects
body: <p>I'm trying to check if an array of items contains an object with a specific key value, and if it does, just update the array of items with the new item object</p>
  
  <pre><code>[{name: example1, quantity: 2},{name: example2, quantity: 3},{name: example3, quantity: 5}]
  </code></pre>
  
  <p>so if for example I'm pushing an object with the same name of "example1", I want to check if it does exist in the array and if it does, just update it with the new object with the new quantity for example.</p>
  
  <p>I tried to explain what I want as best as I can, please let me know if you need more clarification.</p>