so i'm trying to fill my form with myproduct's value where the id_product == input.But when i run the code,the value is not return.What's wrong with my code
this.products.forEach(i => {
if(this.products[i].id == item.id_product)
{
this.form.product_name = this.products[i].product_name;
this.form.id_category = this.products[i].id_category;
this.form.description = this.products[i].description;
this.form.price = this.products[i].price;
this.form.color = this.products[i].color;
this.form.size = this.products[i].size;
this.form.stock = this.products[i].stock;
this.form.weight = this.products[i].weight;
}
});