Mongo Playground

Configuration

[{"name":"a","users":[{"uname":"A"},{"uname":"B"},{"uname":"C"}]},{"name":"b","users":[{"uname":"A"},{"uname":"D"},{"uname":"E"}]},{"name":"c","users":[{"uname":"B"},{"uname":"D"},{"uname":"E"}]}]

Query

db.collection.aggregate([{"$addFields":{"isAPresent":{"$cond":[{"$in":["A","$users.uname"]},true,false]}}}])

Result