Details
-
Question
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
Such as db.products.createIndex(
{ "item": 1, "stock": 1 } )
Quoted from https://docs.mongodb.com/manual/tutorial/sort-results-with-indexes/
You can specify a sort on all the keys of the index or on a subset; however, the sort keys must be listed in the same order as they appear in the index.
As there is no order in javascript object, how could mongodb get an order from that?