仅供自己参考
var arr = [
{key: 0, value: '0'},
{key: 1, value: '1'},
{key: 2, value: '2'},
{key: 3, value: '0'},
]
function repeat(arr) {
let array = [],set = new Set();
arr.forEach(item => {
array.push(item.value);
set.add(item.value);
})
return array.length != set.size;
}
console.log(repeat(arr)); // true