I know I cant query the db with find method and checks if it returns an empty array, but is there any specific method in Mongoose to check if the DB has no objects in it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the mongo shell you could just do:
Each language’s driver should have something equivalent.