I have the following scenario:
$.each(array, function() {
...
$.each(array1, function() {
if condition () { }
});
});
H
$.each(array, function() {
var flag = true;
$.each(array1, function() {
if (condition) {
flag = false;
return false;
}
});
return flag;
});
Set a value to test in the outer loop to exit
$.each(array, function() {
var exit = false;
$.each(array1, function() {
if ( condition ) {
exit = true;
return false;
}
}
if (exit){
return false;
}
}