db.information is the collection that contains the following structure:
information:
{
class_num:
{
standard:
[
{
name:tom,
weight:30
},
{
name:mike,
weight:32
},
{
name:sally,
weight:25
}
]
}
}
I want to sort this data by weight, I tried to use find().sort('weight':-1)
but it doesn't work. How should I point the sort towards the array inside array?