import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'find' } ) export class FindPipe implements PipeTransform { transform ( value , options , key , property ) { let optionFound ; if ( options ) { optionFound = options . find ( ( option ) => option [ key ] === value ) ; } return optionFound ? optionFound [ property ] : '' ; } }