title: query filter for mongodb using node js
body: <p>I have two collection one is questions which stores  _id, title, options, result, feedback and second is a child in the child I have store question_id, score. And I have filter the _id from questions collection. I don't know how I do this, Is it possible can we set the query for this. so that next time when I find the question from questions collection it sends filtered question. Means Return only that question from questions collection which id not same as the second collection child qustion_id.</p>
  
  <p>This is my first collection where I have store questions, _id title option result feedback</p>
  
  <pre><code>        _id:{type:String},
          title:{type:String, required:true},
          options:{type:Array, required:true},
          result:{type:Array, required:true},
          feedback:{type:String}
  </code></pre>
  
  <p>This is my Second collection where I have store attempted question_id and score</p>
  
  <pre><code>    quiz:[
          {
               questionId:{
              type:mongoose.Schema.Types.ObjectId,
              ref: 'Question',
              index: true
                      },
              score:{type:Number},
              time:{type:String}
              }
             ]
  </code></pre>
  
  <p>This is not exactly I just create an example</p>
  
  <pre><code>var query = {}
  firstcollection.find($and[{_id:},{secondcollection question_id:}]},function(err, data){
  
  so that filter data means filter _id will store in data.
  and I send this data to the frontend
  
  res.send(data);
  });
  </code></pre>