src.app.shared.pipes.objectAsEntryList.pipe.ts Maven / Gradle / Ivy
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'objectAsEntryList'})
export class ObjectAsEntryListPipe implements PipeTransform {
transform(value, args:string[]): any {
const keys = [];
for(const key of Object.getOwnPropertyNames(value)) {
keys.push({'key': key, value: value[key]});
}
return keys;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy