Answer the question
In order to leave comments, you need to log in
How to get only _id of documents by mongodb filter?
I only know two methods, but what else are there, and which are faster?
distinct('_id', query)
find(query).select('_id')
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