Database

[{"_id":ObjectId("6683591adb3c21133fd99e12"),"name":"John","batchInfo":[{"batch_id":ObjectId("66834a6d4b221111587def7b"),"studentID":"252105","payments":[2000,1000],"active":false},{"batch_id":ObjectId("668353316c57406f16e14449"),"studentID":"252301","payments":[1000],"active":true},{"batch_id":ObjectId("668353316c57406f16e14420"),"studentID":"252308","payments":[4000],"active":true}]}]

Query

db.collection.update({_id:ObjectId("6683591adb3c21133fd99e12"),"batchInfo.active":true},{$push:{"batchInfo.$.payments":3000}})

Result