title: How to search in an array of objects in mongoose
body: <p>I have a schema as below</p>
  
  <pre><code>var QuestionListSchema = new Schema({
      topicName: String,
      quesList: {
          quesListName: String,
          by: String,
          questions: [{
              question: String
          }]
      }
  });
  </code></pre>
  
  <p>I need to search the question in questions array ;i am doing it by passing search question in params</p>
  
  <p>I have a query as below</p>
  
  <pre><code>exports.question = function(req, res) {
      console.log(req.query.quesListName);
      QuestionList.find({
          "quesList.questions":new RegExp(req.query.questions, 'i')
      }, function(err, questionList) {
          if (err) {
              return handleError(res, err);
          }
          return res.status(200).json(fnData(questionList));
      });
  };
  </code></pre>
  
  <p>but i m unable to get the searched data </p>