Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15016

how can i sort a field in a array

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.8
    • None
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Qin Qin [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: