Here is a simplified version of my problem:
this.store.pipe(
select(arr),
switchMap(arr => {
const data = arr.map(arrItem => this.dataService.getData(arrItem.id));
return forkJoin(...data);
}
map(data => {
console.log(data);
return data;
)
);
Somehow, in console.log I'm getting array of values only if arr.length = 1. If arr.length > 1, I'm getting array of Observables instead.
How is it possible? Am I misunderstanding forkJoin? How can I fix it?
this.dataService.getDatamethod ? AnObservablefrom anHttpClient.getrequest ?