How do i use the C# driver to sort by a nested object (from a mapreduce query)
{"_id": { "date" : "02/01/2001"} }"
SortBy.Descending("_id") 'Sorts by "_id" descending
SortBy.Descending("???") 'Sorts by "date" descending
But Im not sure what to put in value to make this happen
In the case you have given, it will not be necessary to specify the nested object since sorting by the
_idfield will functionally sort on the date contained in that field.You can however reach into nested objects using the dot notation when needed. This would look like: