title: how to push elements in between mongodb aggregate query
body: <p>i have a document like this</p>
  <pre><code>[
    {
      &quot;key&quot;: &quot;key1&quot;,
      &quot;shops&quot;: [
        {
          &quot;shopId&quot;: &quot;S1&quot;,
          &quot;ShopName&quot;: &quot;SN1&quot;
        },
        {
          &quot;shopId&quot;: &quot;S2&quot;,
          &quot;ShopName&quot;: &quot;SN2&quot;
        }
      ]
    }
  ]
  </code></pre>
  <p>i need to write an aggerate query and i have to push some static elements in an array</p>
  <p>i tried like below</p>
  <pre><code>db.collection.aggregate([
    {
      &quot;$match&quot;: {
        &quot;key&quot;: &quot;key1&quot;
      }
    },
    {
      $group: {
        _id: null,
        &quot;shops&quot;: {
          $push: {
            &quot;shopId&quot;: &quot;S3&quot;,
            &quot;ShopName&quot;: &quot;SN3&quot;
          }
        }
      }
    },
    {
      &quot;$unwind&quot;: {
        &quot;path&quot;: &quot;$shops&quot;
      }
    }
  ])
  </code></pre>
  <p>my aim is to add new element in 'shops' array and unwind the document. excepted result should look like below</p>
  <pre><code>[
    {
      &quot;_id&quot;: ObjectId(&quot;5a934e000102030405000000&quot;),
      &quot;key&quot;: &quot;key1&quot;,
      &quot;shops&quot;: {
        &quot;ShopName&quot;: &quot;SN1&quot;,
        &quot;shopId&quot;: &quot;S1&quot;
      }
    },
    {
      &quot;_id&quot;: ObjectId(&quot;5a934e000102030405000000&quot;),
      &quot;key&quot;: &quot;key1&quot;,
      &quot;shops&quot;: {
        &quot;ShopName&quot;: &quot;SN2&quot;,
        &quot;shopId&quot;: &quot;S2&quot;
      }
    },
    {
      &quot;_id&quot;: ObjectId(&quot;5a934e000102030405000000&quot;),
      &quot;key&quot;: &quot;key1&quot;,
      &quot;shops&quot;: {
        &quot;ShopName&quot;: &quot;SN3&quot;,
        &quot;shopId&quot;: &quot;S3&quot;
      }
    }
  ]
  </code></pre>
  <p>Can you please help me out. Thank you in advance</p>