Database

[{foo:false}]

Query

db.collection.aggregate([{$project:{bar:{$cond:[{$eq:["$foo",true]},"fooed","not fooed"]}}}])

Result