Mongodb update level 3 or above cannot be deleted

 Project.updateOne(r, {
    $pull: {
        thunder2: {
            files: {
                _id: "5ab362d446f15936bcea7dd3"
            }
        }
    }
}, function(err, data) {
    if (err) {
        res.send("")
    } else {
        res.send("1")
    }
})
Feb.26,2021

can be done, but requires MongoDB 3.6support. Take a look at arrayFilters . For example:

// :
{
    "_id": ObjectId("5ab8c93249e47f821364662b"),
    "array": [{
        "array": [{
            "_id": ObjectId("5ab8c93249e47f821364662a")
        }]
    }]
}
// :
db.test.update({
    "array.array._id": ObjectId("5ab8c93249e47f821364662a")
}, {
    $pull: {
        "array.$[elm].array": {
            _id: ObjectId("5ab8c93249e47f821364662a")
        }
    }
}, {
    arrayFilters: [{
        "elm.array._id": ObjectId("5ab8c93249e47f821364662a")
    }]
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdc7ff-3130f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdc7ff-3130f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?