I am trying to return an object based on some conditions i.e if some condition is satisfied I want to break the loop and return the object back to the called function.
below is my code.
function someFun(that,filterID,columnSelctedID) {
$.each(that.filters,function(i,filter) {
if(filter.id==filterID) {
$.each(filter.filters,function(j,column) {
if(column.id==$('#' + columnSelctedID + ' .rule-filter-container-column select').val()) {
return column;
}
});
}
});
}