var arr =[
{
"platform_id": 1,
"type_id": 1,
"account_name": "asd",
"account_id": "asd"
},
{
"platform_id": 1,
"type_id": 8,
"account_name": "asd",
"account_id": "as"
},
{
"platform_id": 15,
"type_id": 1,
"account_name": "asd",
"account_id": "asd"
},
{
"platform_id": 15,
"type_id": 8,
"account_name": "asd",
"account_id": "asd"
}
]
for (var i = 0; i < arr.length - 1; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (arr[i].platform_id === arr[j].platform_id && arr[i].account_id === arr[j].account_id) {
console.log("重名了!!");
}
}
}
网友评论