class FilterPipe implements PipeTransform {
transform(items: any[], term): any {
const keys = items.length ? Object.keys(items[0]) : null;
return term && keys
? items.filter(item => keys.some(key => item[key].toString().indexOf(term) !== -1))
: items;
}
}