I am currently doing an online Angular course and I realized that RxJS is quite broadly used in web development. I was experimenting and I came across a nested map operator and I can kind of make sense of what is happening but I cant seem to find much information on it.
this.productService.getProducts().pipe(
map(products =>
products.map(product => {
const data = {...product.payload.val() as Product};
return data;
}))).subscribe(p => this.products = p)
So from my understanding is that the getProducts() function returns a list of Observables, then the outer map operator would emit an individual Observable into the inner map operator which then allows me to access the payload data from the http response? If this is correct, isnt there an easier/cleaner way of performing this functionality ?