Iterate over objects of the array : <p>I've the below array of objects.
How do I iterate over it to change <code>inventory</code> and <code>unit_price</code> if product <code>name</code> is found, and create new product if the <code>name</code> is no found.
for example, if in <code>my_product</code> the name is <code>stool</code> as shown, this record to be added to the array, but if the <code>name</code> is, let's say <code>table</code> then the <code>inventory</code> and <code>unit_price</code> of product <code>table</code> are required to be adjusted.</p>

<pre><code>let products = [
  {
    name: "chair",
    inventory: 5,
    unit_price: 45.99
  },
  {
    name: "table",
    inventory: 10,
    unit_price: 123.75
  },
  {
    name: "sofa",
    inventory: 2,
    unit_price: 399.50
  }
];

let my_product = {name: "stool", inventory: 1, unit_price: 300}
</code></pre>
