Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Devops
  3. Question
Devops

In Mongoose, how do I sort by date? (node.js)

Asked by David Edmunds Jul 4, 2021 1.8K views 1 answer
Share

About this question

let's say I run this query in Mongoose:

Room.find({}, function(err,docs){
}).sort({date:-1});

Please help me with solution.

Your answer

1 Answer

More Devops discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest DevOps Blogs

Guides, tips and career advice on DevOps from JanBask experts.