Answer the question
In order to leave comments, you need to log in
How to get a list of unique existing values in Mongo DB?
All the best! Started learning monga. I did not find an answer in Google, so I suspect that my request was not quite correct. That's what I mean.
There is a collection myCollection :
{"_id":"01", "city": "London", "number": "11", "isActive": "true"}
{"_id":"02", "city": "Paris", "number": "31", "isActive": "true"}
{"_id":"03", "city": "Moscow", "number": "1", "isActive": "false"}
{"_id":"04", "city": "Kiev", "number": "131", "isActive": "true"}
{"_id":"05", "city": "London", "number": "551", "isActive": "true"}
{"_id":"07", "city": "London", "number": "11", "isActive": "true"}
{"_id":"08", "city": "London", "number": "44", "isActive": "true"}
{"_id":"09", "city": "Paris", "number": "77", "isActive": "false"}
{"_id":"10", "city": "Kiev", "number": "77", "isActive": "true"}
{"_id":"11", "city": "Paris", "number": "22", "isActive": "false"}
{"_id":"12", "city": "Paris", "number": "8", "isActive": "true"}
{"city": "London" }
{"city": "Paris"}
{"city": "Moscow"}
{"city": "Kiev"}
["London", "Paris", "Moscow", "Kiev"]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question