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}]}]

Query

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

Result