import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'toRepeat'
})
export class ToRepeatPipe implements PipeTransform {

  transform(value: any): any {
    let str = [];
    let arr = [];
    arr = value.map(e=>{
      return e.mediaTypeName;
    });
    for(let i = 0;i < arr.length ;i++){
      if(!str.includes(arr[i])){
        str.push(arr[i]);
      }
    }
    const res = str.join(" ");
    return res;
  }

}
