Is there a way to sort sub documents in a mongo query?
For example:
{ \"_id\" : ObjectId(\"4c69d19532f73ad544000001\"), \"content\" : \"blah bla
In mongo version 2.4 or above, you can use $sort while updating. The new modifier let you sort sub document.
More information could read this page, http://docs.mongodb.org/manual/reference/operator/sort/