My task involves retrieving an employer's ID based on their name from a list of employers. The function below is used to fetch the list of employers from another API.
getEmployers(): void {
this.employersService.getEmployers().subscribe((employerData: Employer[])=>{this.employerList = employerData})
}
I am specifically looking to find the employerID for an employer named "John" within the employerList.
What would be the best approach to accomplish this task?