Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

285
Vistas
Call multiple API using rxjs and return it as obserable

I am having 4 API let be A,B,C,D and I want to get combine data of all 4 API into single obserable.

I want using forkJoin([A,B]) and using the response of forkJoin into forkJoin([C,D]). Example:

return forJoin([a,b]).pipe(map result=>{
 return forkJoin([c(a.result),d(a.result,b.result)]);
})

Problem for is that I am only getting C and D API response. Anyone can help me out.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

First of all there should be a switchMap for returning the inner forkJoin. And if you want to return also the a and b response, you can just use of the original result:

return forkJoin([a,b]).pipe(
  switchMap(result => {
    return forkJoin([c(result[0]),d(result[0], result[1]), of(result)]
  })
})

Now you get an array of all 3 results, last beeing the array of the first response

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda