I've this function with map, how can call only when finish?
_.map(data,async function (el) {
if(Number.parseInt(el) != NaN && (el != null) && !isNaN(el)){
console.log('ID: ' + el)
await scrapeDetails(el) // <--- need to wait finish and than go to next element in map
}
})
async function scrapeDetails(id){
// ... bla bla
}