I would like to have a "unique" array of another multi-dimensional array, the array looks something like this:
var bigArray = Array(
["text", "text", "A", 1, 2],
["text", "text", "S", 3, 4],
["text", "text", "S", 4, 4],
["text", "text", "S", 5, 7],
["text", "text", "S", 2, 1],
["text", "text", "S", 1, 0]
);
The result should be something like
uniqueArray = [A, S]
And this is the filter function I have atm:
var uniqueArray = bigArray.filter(function(item, i, ar){ return ar.indexOf(item) === i; });
The function gives me ALL the unique values in the big array, but I only need the unique values from row[2]. I guess the parameters must be tweaked a bit from the filter function but I don't understand them well. Thanks for your help