Browse Source

deleted duplicates

rjsmall90 6 years ago
parent
commit
0748542bea
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/providers/connection/district.ts

+ 5
- 1
src/providers/connection/district.ts View File

24
     }
24
     }
25
 
25
 
26
     parseData(data: any) {
26
     parseData(data: any) {
27
-        return data["data"].map(school => new School(school[13]))
27
+        return data["data"].map(school => school[13]).filter(this.onlyUnique).map(school => new School(school));
28
+    }
29
+
30
+    onlyUnique(value, index, self) { 
31
+        return self.indexOf(value) === index;
28
     }
32
     }
29
 
33
 
30
 
34