title: how to retrieve a document with some parameters excluded in the nested array in mongo?
body: <p>I have the attached document structure. I need to retrieve the document with only some parameter.</p>
  
  <p>For example 
  I need  the data to be like this.</p>
  
  <pre><code>{
    "_id": "57f36d71fb1ef61bd84f866b",
    "testMaxScore": 235,
    "testMaxTime": 60,
    "inviteId": "57f0a97d11594560c02a8f43",
    "testName": "Sr. Interactive Developer l1",
    "sectionList": [
      {
        "sectionName": "Java MCQ",
        "sectionInfo": "Some info",
        "questionList": [
          {
            "_id": "57ea3d003f2ec2cbbe98bbb9",
            "question": ""
          },
            {
            "_id": "57ea3d003f2ec2cbbe98bbb9",
            "question": ""
          }
          ]
      }
      ]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GahvI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GahvI.png" alt="enter image description here"></a></p>
  
  <p>How can i acheve this ?
  I am using mongoose</p>
  
  <p>Can anyone help me on this</p>
  
  <p>Thanks,
  Kiran</p>