Database

[{"_id":"6302c8fe15d26c689c8313ca","logs":[{"data":"abc","dataType":"System.string"},{"data":"def","dataType":"System.string"},{"data":"100","dataType":"System.int"}]}]

Query

db.collection.find({logs:{$elemMatch:{dataType:"System.string"}}},{logs:{$filter:{input:"$logs",cond:{$eq:["$$this.dataType","System.string"]}}}})

Result