📅  最后修改于: 2022-03-11 15:03:58.583000             🧑  作者: Mango
var data = [
{name:"Joe", date:'2018-07-01', amt:250 },
{name:"Mars", date:'2018-07-01', amt:250 },
{name:"Joe", date:'2018-07-02', amt:250 },
{name:"Saturn", date:'2018-07-01', amt:250 },
{name:"Joe", date:'2018-07-02', amt:250 },
{name:"Jupiter", date:'2018-07-01', amt:250 },
]
var resArr = [];
data.filter(function(item){
var i = resArr.findIndex(x => (x.name == item.name && x.date == item.date && x.amt == item.amt));
if(i <= -1){
resArr.push(item);
}
return null;
});
console.log(resArr)