I am querying a database asynchronously and getting the result.
const games=await new Promise(res=>{Game.find({ids:id},(err,doc)=>res(doc))})
console.log(games[0])
When I print the result I get the following
{ gameId:'8636f1b196f1c6aa164341be448126ba',
  done: '1',
  score: [],
  finishedAt: '' }
But then when I do console.log(games[0].done) I get undefined whereas the expected output is 1
 
    