Hi I have this two streams with Ofertas and concursos
ofertas$ = this.dataService.getOfertas();
concursos$ = this.dataService.getConcursos();
ofertasConOrganismos$ = forkJoin([
this.ofertas$,
this.concursos$
]);
ngOnInit(): void {
this.ofertasConOrganismos$
.subscribe(item => console.log(item));
}
In Ofertas[] each Oferta has organismoId Property that I need to fill with the relationed value en Concurso[] that has this property too
But when I try this
ofertasConOrganismos$ = forkJoin([
this.ofertas$,
this.concursos$
])
.pipe(
map(([ofertas, concursos]) =>
ofertas.map(oferta => ({
...oferta,
organismoId: concursos.find(c => c.id == oferta.concursoId).organismoId
}) as Oferta))
);
I get this error
Any idea, please?
Thanks



