All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.app.shared.pipes.objectAsEntryList.pipe.ts Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
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