Consider the following MongoDB \"recipes\" collection:
{ \"title\" : \"Macaroni and Cheese\", \"ingredients\" : [ { \"name\" : \"noodles\", \"qty\" :
The following query would give you the bare list minus any duplicates:
db.recipes.aggregate([{$unwind:"$ingredients"},{$group:{_id:"$ingredients.name"}}])
More work would be necessary to add the quantities. It would be easier if the unit for the quantities was specified separately.