var values = {[
{ name: 'jerem' },
{ name: 'jio' },
{ name: 'paul' },
{ name: 'jio' }}
];
var valueArr = values.map(function(item){ return item.name });
var isDuplicate = valueArr.some(function(item, idx){
return valueArr.indexOf(item) != idx
});
console.log(isDuplicate);
How to write the above code using promise all and async? can someone help me here
See Question&Answers more detail:os