How can I unwrap the observable (this.fireStore.getExtras(v["extrasId"]))
inside the following map?
this.authService
.getUser()
.pipe(
flatMap((val) => this.fireStore.getItems(val.uid)),
map((val) =>
val.map((v) => ({ // this is regular array.map
...v,
extras: {
...v["extras"],
url: (this.fireStore.getExtras(v["extrasId"])).url // this is an observable. I want it to be unwrapped inside here itself,
},
}))
)
)
this is the inner observable to be unwrapped (this.fireStore.getExtras(v["extrasId"])).
I tried flatMap but it is returning the function itself ..., url: flatmap() => ...