How can the function below be adapated to search through 2 dimensional arrays? I can't figure it out. I need the example below to result in '["sainsburys"]'.
Thanks
Array.prototype.diff = function(a) {
return this.filter(function(i) {return !(a[0].indexOf(i[0]) > -1);});
};
var oldSupermarkets = [["asda"], ["tesco"], ["sainsburys"]];
var newSupermarkets = [["asda"], ["tesco"]];