Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class OtPipe implements PipeTransform {
- transform(value: any, arg: any, tag: any): any {
- // if (arg === '' || arg.length < 2) { return value; }
- if (arg === '') { return value; }
- if (arg === 'All...') { return value; }
- const result = [];
- for (const key of Object.keys(value)) {
- for (const key1 of Object.keys(value[key])) {
- if (key1 === tag) {
- if (value[key][key1].indexOf(arg) > -1) {
- result.push(value[key]);
- }
- }
- }
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement