title: updating element inside nested array mongoose
body: <p>I am struggling to update element inside nested arrray in mongoDB.</p>
  
  <p>Lets say I have this schema:</p>
  
  <pre><code>var question = new Schema({
    problem: {
      type: String,
      required: true
    },
    multipleChoices: [{
      type: String,
      required: true
    }],
    correctAnswer: {
      type: Number,
      required: true
    }
  });
  
  var testCategorySchema = new Schema({
    category: {
      type: String,
      required: true
    },
    tests: [{
      version: {
        type: String,
        required: true
      },
      questions: [question]
    }]
  });
  </code></pre>
  
  <p>For example I have instance of that schema like this:</p>
  
  <pre><code>{
    category: "Math",
    tests: [
      {
        version: "1A",
        questions: [
           {
             problem: "blablabla",
             multiplechoices: [
              "bla bla", "blb blb", "blc blc"
            ],
             correctAnswer: 1
           },
           {
             problem: "blibliblibli",
             multiplechoices: [
              "bla bla", "blb blb", "blc blc"
            ]
             correctAnswer: 1
           }
        ]
      },
      {
        version: "1B",
        questions: [
           {
             problem: "auauauauau",
             multiplechoices: [
              "bla bla", "blb blb", "blc blc"
            ]
             correctAnswer: 1
           },
           {
             problem: "blibliblibli",
             multiplechoices: [
              "bla bla", "blb blb", "blc blc"
            ]
             correctAnswer: 1
           }
        ]
      }
    ]
  }
  </code></pre>
  
  <p>How can I add new question to the math category when test version is : 1A using mongooseJS?</p>