Database

[{"_id":{"$oid":"61ada7da9a30fd8471869bbc"},"ImportKeyId":5843,"Name":"AV","MissingPersonIds":[{"PhotoId":"2 - Copy.jpg","Description":"Account ID not found"},{"PhotoId":"2 - Copy - Copy.jpg","Description":"Account ID not found"},{"PhotoId":"2 - Copy - Copy (2).jpg","Description":"Account ID not found"},{"PhotoId":"202020 - Copy (2).jpg","Description":"Account ID not found"},{"PhotoId":"202020 - Copy - Copy.jpg","Description":"Account ID not found"},{"PhotoId":"202020 - Copy - Copy (2).jpg","Description":"Account ID not found"}]},{"_id":{"$oid":"619cd7d2181999c9a4da790a"},"ImportKeyId":5753,"Name":"av1","MissingPersonIds":[{"PhotoId":"94578.jpg","Description":"Photo id is not found"},{"PhotoId":"371426759.jpg","Description":"Photo id is not found"}]}]

Query

db.collection.aggregate([{"$match":{"ImportKeyId":5843}},{"$project":{"_id":1,"ImportKeyId":1,MissingPersonIds:{$filter:{input:"$MissingPersonIds",as:"item",cond:{$gt:[{$indexOfCP:[{$toLower:"$$item.PhotoId"},"202020 "]},-1]}}}}}])

Result