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
There is no direct way to do this in mongo. You would need to use map/reduce to retrieve the min val in each array and then sort by that min value