My data[l][m] contains 1,2,3,4,5
I'm trying to search for a particular number, say '2' in it. Is there a better way to do this?
for (var n = 0; n < data[l][m].length; n++) {
if(data[l][m][n] == num){ // num is equal to '2'
number = data[l][0];
document.form.options[l-1] = new Option(number,number,true,true);
}
}
And how about in: ['id1',['a',[1,2,3,4,5]],['b',[3,4,5,6,7]]]
Many thanks in advance.