title: MongoServerError: Cannot create field 'approved' in element
body: <p>I want to push element inside array which is inside nested element.<br />
  Similar questions have been asked. I tried the solutions but didn't worked for me.<br />
  <strong>Error message is</strong></p>
  <pre><code>MongoServerError: Cannot create field 'approved' in 
  element {transactionList: [ { id: 0, greeterAddress: &quot;0x0&quot;, executed: 0, value: 
  &quot;namaste&quot;, approved: [ &quot;0xDcb980b3d6Bd61a86A8d7Cb9bbd937452f7E745D&quot;, 
  &quot;0xDcb980b3d6Bd61a86A8d7Cb9bbd937452f7E745D&quot; ], _id: 
  ObjectId('62275a5b1722b740ade011ad') } ]}
  </code></pre>
  <p><strong>Document Schema</strong></p>
  <pre><code>const transaction = new mongoose.Schema({
      id: {type: Number, required:true},
      greeterAddress: {type:String, required:true},
      executed: {type:Number, required:true},
      value: {type:String, required:true},
      approved:{type: [String]}
  })
  const walletInfo = new mongoose.Schema({
      walletAddress: {type: String, required: true},
      networkName: {type: String, required:true},
      minApproval: {type: Number, required:true},
      ownerAddress: {type: [String]},
      greeter: {type: [String]}, 
      transactionList: {type:[transaction]}
  })
  </code></pre>
  <p><strong>Executed code which is giving out the error</strong></p>
  <pre><code>app.post('/approve_transaction', async(req,res)=&gt;{
      walletAddress = req.query.address
      id =  req.query.id
      greeterAddress =  req.query.greeterAddress
      await walletInfo.updateOne(
          {
              walletAddress:walletAddress,
              'transactionList.id':id,
              'transactionList.greeterAddress':greeterAddress
          },
          {
              $push:{
                  'transactionList.approved':walletAddress
              }
          })
      res.sendFile('success')
         
      
  })
  </code></pre>
  <p><strong>Document present below</strong></p>
  <pre><code>{
  &quot;_id&quot; : ObjectId(&quot;62275a0f1722b740ade011a9&quot;),
  &quot;walletAddress&quot; : &quot;0xDcb980b3d6Bd61a86A8d7Cb9bbd937452f7E745D&quot;,
  &quot;networkName&quot; : &quot;4&quot;,
  &quot;minApproval&quot; : 1,
  &quot;ownerAddress&quot; : [ 
      &quot;0x6ED8cB56eF8602e138E7e588EA65A5b33f402087&quot;, 
      &quot;0x6cb691b71CB057e3C92DBB729580e1A7A2868e1c&quot;
  ],
  &quot;greeter&quot; : [],
  &quot;transactionList&quot; : [ 
      {
          &quot;id&quot; : 0,
          &quot;greeterAddress&quot; : &quot;0x0&quot;,
          &quot;executed&quot; : 0,
          &quot;value&quot; : &quot;namaste&quot;,
          &quot;approved&quot; : [],
          &quot;_id&quot; : ObjectId(&quot;62275a5b1722b740ade011ad&quot;)
      }
  ],
  &quot;__v&quot; : 0
  }
  </code></pre>