title: Async await handle Promise { <Pending> } Express API
body: <p>I got this API controler:</p>
  <pre><code>exports.doctorsList = async (req, res) =&gt; {
      const users = await User.find().exec();
      let responseArray = await users.map(async (user) =&gt; {
          const transaction = await MedicalConsultation.find({
              doctorOwner: user._id,
          }).exec();
  
          let cpLength = transaction.length;
  
          return await {
              _id: user._id,
              name: user.name,
              email: user.email,
              specialty: user.specialty,
              role: user.role,
              createdAt: user.createdAt,
              c_p: cpLength,
              status: user.status,
          };
      });
  
      console.log(responseArray);
      res.json(responseArray);
  };
  </code></pre>
  <p>In the console.log I got:</p>
  <pre><code>[ Promise { &lt;pending&gt; }, Promise { &lt;pending&gt; }, Promise 
  { &lt;pending&gt; } ]
  </code></pre>
  <p>How is the correct way to write that code? or how to obtain the values?</p>