Пытаюсь сделать так
var arr = new Array();
var arr = [['Gbwwf',2], ['Gbwwf',2], ['Gbwwf',2], ['Gbdj',2], ['Gbdj',2]];
document.write(arr + '<br />');
var f = 0;
var arr2 = new Array(
[, ]
);
for (var i=0; i<arr.length; i++) {
for (var j=0; j<arr.length; j++) {
if (arr[i, 0] == arr[j, 0]) {
if(arr2[arr[i, 0], 0]) {
arr2[arr[i, 0], 0] += 1;
} else {
arr2[arr[i, 0], 0] = 1;
}
arr.splice(j, 1)
j--;
}
}
}