I'm parsing an input file and run over every element with the Array.every function. Depending on the structure, a manual input of the user is needed. So if you have for example something like this:
configData.users.every(function(user){
if(user.enabled == 1){
if(user.mobile == 1){
prompt.start();
prompt.get(['mCode'], function (err, result) {
//Do something...
//return needed here!
});
}else{
//Do something else...
return true;
}
}
});
So in my case prompt is calling a callback function when the input by the user is typed in. At this point where are clear and the next element can be handled. So how can I call return at this point to continue the every() function?
Thanks for you help.