Add ability to sort subdocuments by attribute