Is there a different approach to retrieving an Observable with an Array of ReferenceData arrays? I've been struggling with this issue for a couple of days. Here is my current code:
export class ReferenceData {
id: number;
caption: string;
constructor(_id: number, _caption: string) {
this.id = _id
this.caption = _caption
}
}
const observables = [
of([new ReferenceData(1, 'Test'), new ReferenceData(2, 'Test 2')]),
];
const getData = (): Observable<[ReferenceData[]]> {
return observables.map((obs) => {
return obs.pipe(
map((data) => {
return [...data]
})
)
})
}
The expected return type from the getData function is:
Observable<[ReferenceData[]]>