title: I need to push into nested array in node mongoose
body: <p>I used node mongoose.
  I need to update this array push new item into <code>Breackfast(mealList.foodList.breackfast || any)</code>,
  I want to add new <code>foodlist</code> by time can you please give me suggestion for how to do,</p>
  <pre><code>    {
          &quot;_id&quot;: &quot;5fe43eb44cd6820963c98c32&quot;,
          &quot;name&quot;: &quot;Monday Diet&quot;,
          &quot;userID&quot;: &quot;5f225d7458b48d0fe897662e&quot;,
          &quot;day&quot;: &quot;Monday&quot;,
          &quot;type&quot;: &quot;private&quot;,
          &quot;mealList&quot;: [
              {
                  &quot;_id&quot;: &quot;5fe43eb44cd6820963c98c33&quot;,
                  &quot;time&quot;: &quot;Breakfast&quot;,
                  &quot;foodList&quot;: [
                      {
                          &quot;_id&quot;: &quot;5fe43eb44cd6820963c98c34&quot;,
                          &quot;foodName&quot;: &quot;Eggs&quot;,
                          &quot;Qty&quot;: &quot;2&quot;,
                          &quot;calories&quot;: &quot;calories&quot;,
                          &quot;category&quot;: &quot;category&quot;
                      }
                      
                  ]
              },
              {
                  &quot;_id&quot;: &quot;5fe43eb44cd6820963c98c36&quot;,
                  &quot;time&quot;: &quot;Lunch&quot;,
                  &quot;foodList&quot;: [
                      {
                          &quot;_id&quot;: &quot;5fe43eb44cd6820963c98c37&quot;,
                          &quot;foodName&quot;: &quot;food1&quot;,
                          &quot;Qty&quot;: &quot;100g&quot;
                      },
                  ]
              }
          ],
          &quot;createdAt&quot;: &quot;2020-12-24T07:09:40.141Z&quot;,
          &quot;updatedAt&quot;: &quot;2020-12-24T07:09:40.141Z&quot;,
          &quot;__v&quot;: 0
      }
  
  </code></pre>
  <p>I tried:</p>
  <pre><code>Diet.updateOne(
      { &quot;Diet.mealList._id&quot;: req.body.mealId },
      // { $push: { &quot;Diet.0.mealList.$.foodList&quot;: req.body.foodList } },
      { $push: { foodList: req.body.foodList } }
  )
  </code></pre>