vue中判断数组某个值是否重复
function checkData(){ var arr = [{name: 'apple', value: 123}, {name: 'banana', value: 345}, {name: 'apple', value: 222}]; for (var i=0; i<arr.length; i++) { for (var j=i+1; j<arr.length; j++) { if (arr[i].name == ar