Closed
Description
Referring to https://www.mongodb.com/docs/manual/reference/operator/aggregation/sortArray/
sorting of simple e.g. int array should be possible:
"$sortArray":
{
"input": [ 1, 4, 1, 6, 12, 5 ],
"sortBy": 1
}
however ArrayOperators.SortArray.by
only accepts type Sort
, which seems to always require a property. Not clear if any way to set a simple ASC/DESC
order to sort by.
Seems simple feature that has been missed off, or if possible missed of documentation on how to achieve?