I need your help in RxJS.
I made this code, that's needed to fetch an API, and for returned element, get this element type from another API. This code works fine, but it return an Observable for 'type' property instead of "string" only. Do you know how to achieve this? Thanks a lot.
combineLatest([
this.service.list().pipe(
map(items =>
items.map(item => {
item['type'] = this.getType(item.id);
return item;
})
),
map(items => items.map(item => ({
id: item.id,
type: item['type'],
})))
),
this.form.valueChanges,
]).subscribe()