Database
[{"_id":3,"_id2":234,"thing":{"2340945683":{"attribute1":"typeA","attribute2":"typeB","attribute3":"typeA"},"349687346":{"attribute1":"typeC","attribute2":"typeB","attribute3":"typeA"}},"username":"user1"}]
Query
db.collection.aggregate([{$match:{$expr:{$anyElementTrue:{$map:{input:{$objectToArray:"$thing"},in:{$eq:["$$this.v.attribute1","typeC"]}}}}}}])