title: my array of object is stored twice in local storage
body: <pre><code>  select(product){
  
       let products =[]
        products.push(product)
         products.forEach((key) =&gt; {
          key["quantity"] = 1;
        })
  
  
    localStorage.setItem('cart', JSON.stringify(products))
  }
  </code></pre>
  
  <p>this is my component.ts file, i have been storing my product array = [{id: 48, title: "Drink", price: 30, category: "Drink"}].
  it is storing in local storage but twice like this...</p>
  
  <p>[{id: 48, title: "Drink", price: 30, category: "Drink",…}]</p>
  
  <p>:
  {id: 48, title: "Drink", price: 30, category: "Drink",…}</p>