Edit: just sort the results with array.sort
results = result.sort(function (a, b){ // decide with result is greater // return + for stay for a > b // return negative for b > a })
Old answer: Taken from https://www.parse.com/docs/js/api/classes/Parse.Query.html :
Parse.Query addDescending (key) Sorts the results in descending order by the given key, but can also add secondary sort descriptors without overwriting _order.
Parameters: key <(String | String | ... String> The key to the order, which is a string of values separated by commas, or an array of keys or several keys.
Returns: Returns the request, so you can bind this call.
Parse.Query Descending (key) Sorts the results in descending order by the given key.
Parameters: key <(String | String | ... String> The key to the order, which is a string of values separated by commas, or an array of keys or several keys.
Returns: Returns the request, so you can bind this call.
query.include("post.createdAt") query.descending("post.createdAt")
user6101582
source share