I'm facing an issue with my map function where it is not waiting for the request response before moving on to the next index.
this.products = [];
productList.map((product) => {
this.productService.getProductInfo(product).subscribe(productData => {
productData.selected = true;
this.products.push(productData);
});
});
Is there a way to make the map function wait for the request response?