Database

[{"feature":"abc","translations":[{"lang":"en","text":"This is my text in english"},{"lang":"de","text":"This is my text in german"}]},{"feature":"cde","translations":[{"lang":"en","text":"This is my text in english"}]}]

Query

db.collection.aggregate([{"$set":{"aux_translations":{"$filter":{"input":"$translations","as":"l","cond":{"$eq":["$$l.lang","de"]}}}}},{"$project":{"translation":{"$cond":{"if":{"$eq":[{"$size":"$aux_translations"},0]},"then":{"$arrayElemAt":["$translations.text",0]},"else":{"$arrayElemAt":["$aux_translations.text",0]}}}}}])

Result