SyntaxFix
Write A Post
Hire A Developer
Questions
Try an simple loop:
var repeat = [], tmp, i = 0; while(i < values.length){ repeat.indexOf(tmp = values[i++].name) > -1 ? values.pop(i--) : repeat.push(tmp) }
Demo