title: How can I compare two fields in diffrent two collections in mongodb?
body: <p>I am beginner in the MongoDB.
  Right now, I am making one query by using mongo. Please look this and let me know is it possible? If it is possible, how can I do?</p>
  
  <pre><code>collection:students 
  [{id:a, name:a-name}, {id:b, name:b-name}, {id:c, name:c-name}]
  
  collection:school
  [{
      name:schoolA,
      students:[a,b,c]
  }]
  
  collection:room
  [{ 
      name:roomA,
      students:[c,a]
  }]
  </code></pre>
  
  <p>Expected result for roomA</p>
  
  <pre><code> {
          name:roomA,
          students:[
              {id:a name:a-name isRoom:YES},
              {id:b name:b-name isRoom:NO},
              {id:c name:c-name isRoom:YES}
          ]
      }
  </code></pre>