cart(){
let itemList= this.orderService.getCart()
let obj = {
quantity : 1
}
itemList.push(obj);
this.product = itemList
console.log("get products",this.product);
}
this is my component.ts file and iam getting array of objects, i want to push an object "quantity" with value "0" in an array of obejcts. i have this response
this.orderService.getCart() = [{id: 48, title: "Mango Juices", price: "30", category: "juices"}]
and now when i am going to push i get this result....
0:{id: 48, title: "Mango Juices", price: "30", category: "juices"}
1:{quantity: 1}