typescript search array for value code example
Example: find value in array ts
this.persons = this.personService.getPersons().find(x => x.id == this.personId);
this.persons = this.personService.getPersons().find(x => x.id == this.personId);