var arr = ["曹阳","曹阳","曹阳","张三","张三","张三","张三","张三",];
var temp = [];
var obj = {};
var newArr = [];
for (var i = ; i < arr.length; i++) {
var dt = arr[i];
if (obj[dt]) {
obj[dt]++;
} else {
temp.push(dt);
obj[dt] = ;
}
}
console.log(temp);
for (const i in obj) {
newArr.push({
'name':i,
'value':obj[i]
})
}
console.log(newArr);