This is the code where I'm calling a function
masterCredsResponse.data.forEach((masterCred) => {
// Check Login status
masterCredsArray.push({
master: masterCred.parent,
loginCheck: Promise.resolve(getSessionID()())
})
})
Here I get
loginCheck: Promise { <pending> }
I'm seeing a lot of questions on this topic but unable to understand how to get it done. When I don't use loop but call it separately then it works like
let loginCheckReponse = await getSessionID()()
But i use this method in a loop that doesn't work
loginCheck: await getSessionID()() // Doesn't work