title: How to use ObjectId in $lookup using mongodb nodejs drivers
body: <p>Please help me to find out a suitable solution </p>
  
  <p>collection were users details are stored <strong>app_users</strong></p>
  
  <pre><code>{
    _id: {
      $oid: "abcd1235a6ad4a56dadasd"
    },
    user_name: "vikas Kandari",
    user_dp: "ASDAD486412.jpg"
  }
  </code></pre>
  
  <p>collection where users bookings are stored <strong>bookings</strong></p>
  
  <pre><code>{
    _id : {
      $oid : "asdasdasdasdasd"
    },
    user_id : "abcd1235a6ad4a56dadasd",
    booking_item : "some product",
    booking_date : "datetime"
  }
  </code></pre>
  
  <p>Lookup(left Join) query i am using is </p>
  
  <pre><code>const MongoClient = require('mongodb').MongoClient;
  const assert = require('assert');
  const url = 'mongodb://root:root@localhost:3000/app';
  const dbName = 'app';
  MongoClient.connect(url, function(err, client) {
    assert.equal(err, null);
    console.log("Connected successfully to server");
    const db = client.db(dbName);
    const collection = db.collection('users');
    collection.aggregate([{
      $lookup: {
        from: 'bookings',
        localField: '_id',
        foreignField: 'user_id',
        as: 'bookings'
      }
    }]).toArray(function(err, docs) {
      assert.equal(err, null);
      console.log(docs);
    });
    client.close();
  });
  </code></pre>
  
  <p>I want to select bookings with there corresponding user details from users collections but Its returning blank because mongodb is comparing string with objectId so is there any way to perform this task ? </p>