Here you’re trying to loop through an array that you’re already looping (myArray[i])
You should go one level deeper:
for(var k = 0; k < myArray[i][j].length; k++) {
I would use recursion for that. Here is my implementation:
Array.prototype.find = function(query){
for (var index in this){
var value = this[index];
if (typeof(value.find) === 'function'){
if(value.find(query)) { return true; }
}
if (value == query){
return true;
}
}
return false;
}
That worked megazoid.
As for your solution, I don’t understand a thing of it
This will take some time to understand.
Thank you for sharing your knowledge!