Finds the distinct values for a specified field across the collection.
public distinct ( string $collectionName, string $fieldName, array | object $filter = [], array $options = [] ) : mixed[] | ||
$collectionName | string | |
$fieldName | string | Field for which to return distinct values |
$filter | array | object | Query by which to filter documents |
$options | array | Command options |
Résultat | mixed[] |