, JQuery.
for (var i = 0; i <array.length; i++) {
if(array[i][0] == 'emi_77'){
alert("exists");
}
}
, :
function IsIn2D(str,order,array){
for (var i = 0; i <array.length; i++) {
return array[i][order] == str;
}
}
Where;
an array is the array you want to find. str is the string you want to check if it exists - the order of the string in internal arrays,
for example, by applying this to a two-dimensional array of questions:
emi_309 | present | weak | 6
emi_310 | present | strong | 9
emi_319 | present | middle | 8
emi_315 | present | weak | 5
IsIn2D('emi_77',0,array);
IsIn2D('emi_315',0,array);
source
share