I am trying to eliminate duplicate elements in a array, the thing is that my array has the following:
var array=[];
array[0]["firstColumn"]="Peter";
array[0]["SecondColumn"]=[];
array[1]["firstColumn"]="Peter";
array[1]["SecondColumn"]=[];
I tried something like this but it will only eliminate the array if in each value it has only a string
$.each($scope.array, function(i, el){
if($.inArray(el.Adultos, uniqueNames) === -1) uniqueNames.push(el);
});