Hi guys,
What’s the best way to find distinct values of a certain field in a database collection.
Let’s say I have a field key ‘value’ with the values: 1,2,2,2,3,4 and I wish to get [1,2,3,4] what should I do? I can run some JavaScript on the query results to find the unique values, but I’m wondering if there’s any way to do it with direct DB query?
Thanks,
J.D.