'Sort by nested Embedded Document List
obj = self.get_object()
# Need to add sorting here
submited_talents_page = paginator.paginate_queryset(
obj.doc_list, request
)
the list lloks like this:
obj.doc_list = [{
"user": ObjectId("12123124"),
"viewers": [],
"application": ObjectId("34322")
}
]
application:
"timestamp": "<timestamp>",
"code": "DEF"
}
I need to sort the application.timestamp inside obj.doc_list.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
