I would like to return the documents in an order sorted by which holds the lowest foo.bar value (which are array objects).
foo.bar
I can do db.collection
db.collection
You can do such a sort with aggregate command from mongo version 2.2:
db.collection.aggregate([{$unwind: "$foo"}, {$project: {bars:"$foo.bar"}}, {$group: {_id:"$_id",min:{$min: "$bars"}}}, {$sort: {min:1}}])