typescript find in array by 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);