It should have given me not null output but I am getting null output. It is working fine if I console inside the block of code but outside it gives me null value
Here is the code:

```
app.post("/downloadDb",async (req,res)=>{
 var docData = [];
 var idList = [];
  console.log("downloadBd");
  const mahafuzCol = firestore.collection("Mahafuz")
  await mahafuzCol.listDocuments()
  .then( listDoc=>{
   //List of id fetch 

    listDoc.forEach(data=>{
      idList.push(data.id)
    });
  }).catch(e=>console.log(e));

  //document is fetched 
  await idList.forEach(id=>{
    mahafuzCol.doc(id).get().then(
      doc=>{
        docData.push(doc.data());
        //Here I get desire output w=if I log with console
      }
    );
  });

//Here I get null output
  await console.log(docData);
});

```