Database

[{"_id":"609927e31233700004370cfb","title":"Hello World","createdAt":"2021-05-10T12:32:35.799Z","updatedAt":"2021-05-10T15:58:59.149Z","updates":[]},{"_id":"60940ad73ced476b2d0b3620","createdAt":"2021-05-06T15:27:19.814Z","updatedAt":"2021-05-10T12:49:08.167Z","updates":[{"_id":"60952c0ed31c6283f302eb23","post_id":"60940ad73ced476b2d0b3626","description":"This is an update description","createdAt":"2021-05-07T12:01:18.815Z","updatedAt":"2021-05-07T12:01:18.815Z",},]},{"_id":"60940ad73ced476b2d0b3626","createdAt":"2021-05-06T15:27:19.814Z","updatedAt":"2021-05-10T12:49:08.167Z","updates":[{"_id":"60952c0ed31c6283f302eb23","post_id":"60940ad73ced476b2d0b3626","description":"All updates completed","createdAt":"2021-05-07T12:01:18.815Z","updatedAt":"2021-05-07T12:01:18.815Z",},]}]

Query

db.collection.aggregate([{"$facet":{"emptyUpdates":[{"$match":{$expr:{$eq:["$updates",[]]}}}],"withoutUpdate":[{"$match":{$expr:{$ne:["$updates",[]]}}},{"$redact":{"$cond":[{"$anyElementTrue":{"$filter":{"input":"$updates","cond":{$eq:["$$this.description","All updates completed"]}}}},"$$PRUNE","$$KEEP",]}}]}},{"$project":{combined:{"$concatArrays":["$emptyUpdates","$withoutUpdate"]}}},{"$unwind":"$combined"},{"$replaceRoot":{"newRoot":"$combined"}}])

Result