Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!