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

110
Vistas
Add find inside pipe

I have the following code :

await this.panelService.getActivePanels().subscribe(activePanels => {
      panel = activePanels.find(panel => panel.serviceId === serviceId);
    });

I want to add a pipe before the subscribe, that does the find operation, so when I subscribe I will get just the one panel returned by the find, is that possible? and how would it look?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

What you are looking for is called map and you can use it like this:

this.panelService.getActivePanels().pipe(
  map(activePanels => activePanels.find(panel => panel.serviceId === serviceId))
).subscribe(panel => {
  console.log(panel);
});
about 4 years ago · Juan Pablo Isaza 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