title: MongoShell query not working with Node JS
body: <p>I'm using Studio3T to generate my aggregation pipeline for 3 stages to join multiple collections. The staging output is displayed together with JSON data from that multiple data. But when i use the code provided in STudio3T to my Node Js Code, no data are displayed! i use Mongoose for ODM. What should i change in NodeJS before my MongoShell query are working?</p>
  <p>here is the code</p>
  <pre><code>use Scheduling_system;
  db.getCollection(&quot;timetables&quot;).aggregate(
      [
          { 
              &quot;$match&quot; : { 
                  &quot;teacher&quot; : ObjectId(&quot;5ea85945d9e58a0be4663aff&quot;)
              }
          }, 
          { 
              &quot;$lookup&quot; : { 
                  &quot;from&quot; : &quot;classrooms&quot;, 
                  &quot;localField&quot; : &quot;classroom&quot;, 
                  &quot;foreignField&quot; : &quot;_id&quot;, 
                  &quot;as&quot; : &quot;join_classrom&quot;
              }
          }, 
          { 
              &quot;$lookup&quot; : { 
                  &quot;from&quot; : &quot;subjects&quot;, 
                  &quot;localField&quot; : &quot;subject&quot;, 
                  &quot;foreignField&quot; : &quot;_id&quot;, 
                  &quot;as&quot; : &quot;join_subject&quot;
              }
          }
      ], 
      { 
          &quot;allowDiskUse&quot; : false
      }
  );
  
  </code></pre>