title: Check if value exist in the array of objects and if it there update it
body: <p>I am trying to check if the product with that id exist and if it is update quantity
  Pushing all of the created struct obj to and array of objects</p>
  <pre><code>contract TheStore is Ownable {
       
      struct Store {
          uint id;
          uint quantity;
      }
  
      mapping(address =&gt; Store[]) public productsId;
      Store[] public store;
  
      
      function addProduct(uint id,  uint quantity) public {
          if(id == store.id){
       product[id].quantity +=  quantity
      }
          store.push(Store({id: id ; quantity: quantity}));
      }
  
      function AllProducts() public view returns (Store[] memory)
      {
          return store;
      }
  
           
  }```
  </code></pre>