@@ -9,14 +9,13 @@ Retrieve Distinct Values of a Field
99.. note::
1010 If you specify a callback method, ``distinct()`` returns nothing. If you do
1111 not specify one, this method returns a ``Promise`` that resolves to the
12- result object when it completes. See our guide on :doc :`Promises and
13- Callbacks </fundamentals/promises>` for more information, or the
12+ result object when it completes. See our guide on :ref :`Promises and Callbacks <node-promises-and-callbacks>`
13+ for more information, or the
1414 `API documentation <{+api+}/classes/Collection.html#~resultcallback>`__ for
1515 information on the result object.
1616
17- You can retrieve a list of :doc:`distinct values </fundamentals/crud/read-operations/distinct>`
18- for a field across a collection by using the
19- `collection.distinct() <{+api+}/classes/Collection.html#distinct>`__
17+ You can retrieve a list of distinct values for a field across a collection by using
18+ the `collection.distinct() <{+api+}/classes/Collection.html#distinct>`__
2019method. Call the ``distinct()`` method on a ``Collection`` object with a document
2120field name parameter as a ``String`` to produce a list that contains one of each
2221of the different values found in the specified document field as shown below:
@@ -49,6 +48,9 @@ message that resembles the following:
4948
5049 "key" had the wrong type. Expected string, found <non-string type>
5150
51+ Visit :ref:`node-fundamentals-distinct` for more information about the `distinct()`
52+ method.
53+
5254Example
5355-------
5456
0 commit comments