// create a new file named filter-top-use.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'filterTopUse'
})
export class FilterTopUsePipe implements PipeTransform {

  transform(items: any[]): any[] {
    if (!items) {
      return [];
    }
    return items.filter(item => item.label !== null && item.value !== null);
  }
}
