title: MongoDB find returns undefined in Node.Js code
body: <p>Express is returning <code>undefined</code> in the console log. I wanted to get the data shown below.</p>
  
  <pre><code>app.get('/api/leaders/', async (req, res) =&gt; {
      try {
          const client = await MongoClient.connect('mongodb://localhost:27017', {useNewUrlParser: true, useUnifiedTopology: true});
          const db = client.db('leaders');
  
          const leadersList = await db.collection('leaders').find({}).toArray(function (err, result) {
              console.log("Connected correctly to server");
              console.log(result);
          });
  
          res.status(200).json(leadersList);
  
          client.close();
  
      } catch (error) {
          res.status(500).json({message: 'Error connecting to db', error});
      }
  })
  </code></pre>
  
  <p>Here is the data I want returned from the db:</p>
  
  <pre><code>db.leaders.find({})
  { "_id" : ObjectId("5eb8922d17d98c2bb6f98a5a"), "username" : "kk", "score" : 20 }
  { "_id" : ObjectId("5eb8922d17d98c2bb6f98a5b"), "username" : "mj", "score" : 18 }
  { "_id" : ObjectId("5eb8922d17d98c2bb6f98a5c"), "username" : "vr", "score" : 15 }
  { "_id" : ObjectId("5eb8922d17d98c2bb6f98a5d"), "username" : "mdb", "score" : "25" }
  </code></pre>