Database

[{"_id":ObjectId("607ddd26145c153476497e3f"),"official number":NumberLong(11198),"mariners":[{"name":"John Williams","last_ship_name":"Majestic of Aberystwyth","this_ship_joining_port":"Llanelly","age":NumberLong(35),"this_ship_leaving_cause":"Remains on board","this_ship_joining_date":"1850-09-21","place_of_birth":"Cardigan","additional_notes":"Remains on board","signed_with_mark":"N","this_ship_capacity":"Mate","last_ship_leaving_date":NumberLong(1868),"last_ship_port":"Cardiff"},{"home_address":"No info","name":"Edward Jones","last_ship_name":"Naval Reserve","this_ship_joining_port":"Liverpool","this_ship_leaving_date":"01/03/1879","age":"No info","this_ship_leaving_cause":"Discharged","this_ship_leaving_port":"[Hamburg?]","this_ship_joining_date":"1850-09","year_of_birth":NumberLong(1855),"place_of_birth":"Liverpool","additional_notes":"Discharged - in hospital","signed_with_mark":"Y","this_ship_capacity":"$","last_ship_leaving_date":NumberLong(1877),"last_ship_port":"Liverpool"}],"vessel name":"Jane Ellen","port of registry":"Holland"}]

Query

db.collection.aggregate([{$unwind:"$mariners"},{$match:{$and:[{"mariners.this_ship_capacity":{$exists:true}},{"mariners.this_ship_capacity":{$ne:"missing"}}]}},{$project:{_id:0,"this_ship_capacity":"$mariners.this_ship_capacity"}}])

Result