I have following object of zip codes. I am trying to get only the unique values of zip code so repeated values are removed.
this.listuser = [{"zip": 12345},{"zip": 78601},{ "zip": 12345},{ "zip": 78601}];
I am trying to remove duplicate values of zip and
this.resl=this.listuser.filter(zip, i,a)=> i===a.indedOf(zip));
Basically this does nothing. There is no error and still I see the duplicates. I have tried other solutions from Stack Overflow for some reason same thing no error but still duplicate show up.
Please let me know how to fix this so I can get unique values of zip code only.