0

So, if I have something like the following:

 let searchObj = {};
for (var i = 0; i < list.length; i++){
   var info = client.runFunction(variable, 0, -1, async function(err, result){
    var amount = parseInt(result[0]);
    searchObj[result1[i]] = amount;
  });
}

How can I access searchObj from outside of the callback? If I debug and print from within the callback, it works, otherwise it doesn't.

0 Answers0