import { Pipe , PipeTransform } from "@angular/core" ; example @ Pipe ( { name : "keys" , } ) export class KeysPipe implements PipeTransform { transform ( value , args ? ) { const keys = [ ] ; for ( const key of Object . keys ( value ) ) { keys . push ( { key : key , value : value [ key ] } ) ; } return keys ; } }