首页 > 编程语言 > 详细

对象数组判断重复

时间:2018-10-26 19:02:25      阅读:190      评论:0      收藏:0      [点我收藏+]
judgeduplicatelianxiren(arr){
var s = new Set()
arr.forEach(i => s.add(i.custPhone))
if(arr.length !== s.size) {
return true
}else{
return false
}  
}

 

对象数组判断重复

原文:https://www.cnblogs.com/lgp142332/p/9857770.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!