Database

[{"location":"Austin","score":""},{"location":"no","score":""}]

Query

db.collection.aggregate([{"$project":{"score":{"$cond":{"if":{"$regexMatch":{"input":"$location","regex":"Austin"}},"then":1,"else":0}},"location":1,"firstName":1,"lastName":1}}])

Result