I'm using meteor and trying to sort a collection by a child
Example: sorting [{foo:{bar:1}},{foo:{bar:9}},{foo:{bar:3}}]
by foo.bar
.
I tried to do it with the following code:
Collection.find({},{sort:{"foo.bar":1}})
However, I keep getting the following error
error: { "$err" : "Unsupported projection option: foo.bar", "code" : 13097 }
Is there some alternate way I should go about sorting by child nodes? This is MiniMongo so I can't use aggregate.
Thanks.