1

I need to sort data by dateTime.

sorting array in object in mongodb is not working

db.collection.aggregate([
  {
    "$sort": {
      "values.dateTime": 1
    }
  }
])

https://mongoplayground.net/p/-JtwQtIhxtl

0 Answers0