How can I sort the items by the first element in the array? Here is the example, the authors is an array list, and I want that the list is sorted by the first element.
"authors":"[John Doe, Mark Miller]"
I tried like below, but doesn't work.
db.collection('books')
.find()
.sort({ "authors[0]": 1 })