var doctorAry = [ ] ;
// datas是包含多个数组的大数组
// item 是每一个小数组
datas.map((item,index) => {
if(doctorAry.indexOf(item.doctorName) == -1){
doctorAry.push(item)
}
})
// doctorAry 是过滤出带有相同doctorName属性的大数组
console.log( doctorAry )
判断多个数组里是否有相同的属性
原文:https://www.cnblogs.com/zhangyongxi/p/10665434.html