From 0a1baf5442a99d8933de830c1de04d7415d5acd8 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Thu, 29 Sep 2022 13:33:23 +0200 Subject: [PATCH] style(query): add examples of "array of array key-value pairs" for "query.sort" --- lib/query.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/query.js b/lib/query.js index 25aec281dcd..e7b8c827620 100644 --- a/lib/query.js +++ b/lib/query.js @@ -2951,11 +2951,14 @@ Query.prototype.distinct = function(field, conditions, callback) { * // equivalent * query.sort('field -test'); * + * // also possible is to use a array with array key-value pairs + * query.sort([["field", "asc"]]); + * * #### Note: * * Cannot be used with `distinct()` * - * @param {Object|String} arg + * @param {Object|String|Array.>} arg * @return {Query} this * @see cursor.sort https://docs.mongodb.org/manual/reference/method/cursor.sort/ * @api public