[SERVER-15016] how can i sort a field in a array Created: 25/Aug/14  Updated: 10/Dec/14  Resolved: 25/Aug/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.8
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Qin [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

i have some data like this:
{
config:{
[id:'',count:1],
[id:'',count:2]
}
}

now i want sort by config.count,but it not sort the field what i query.
if a record has some counts,it will sort by the largest one or the smallest one,not what i query.



 Comments   
Comment by Ramon Fernandez Marina [ 25/Aug/14 ]

Thanks for your report. The SERVER project is for reporting bugs or feature suggestions for the MongoDB server and tools. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

Generated at Thu Feb 08 03:36:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.