I have a function that does several DDBB calls, so it is asynchronous.
I need to call the function and check a data value (winner) in the JSON object it returns. If it is true i need to call the function again until winner == false.
I can't use while because it is not asynchronous, how can i do this?
someFunction(function(result) {
// if result.winner == true repeat
})