I got a jquery function :
$.extend({
    distinct : function(anArray) {
        var result = [];
        $.each(anArray, function(i,v){
            if ($.inArray([v.key, v.value], result) == -1) result.push([v.key, v.value]);
        });
        return result;
    }
});
I want to get unique [key,value] on the anArray array.
But the $.inArray([v.key, v.value], result) always returns -1, so at the end I always have all the values in result array.
What's wrong ?
 
     
    