showing results for - "check unique object in array javascript site 3astackoverflow com"
Lilia
08 Apr 2017
1var data = [
2{name:"Joe", date:'2018-07-01', amt:250 },
3{name:"Mars", date:'2018-07-01', amt:250 },
4{name:"Joe", date:'2018-07-02', amt:250 },
5{name:"Saturn", date:'2018-07-01', amt:250 },
6{name:"Joe", date:'2018-07-02', amt:250 },
7{name:"Jupiter", date:'2018-07-01', amt:250 },
8]
9var resArr = [];
10data.filter(function(item){
11  var i = resArr.findIndex(x => (x.name == item.name && x.date == item.date && x.amt == item.amt));
12  if(i <= -1){
13        resArr.push(item);
14  }
15  return null;
16});
17console.log(resArr)