0 votes
in MongoDB by
What is the syntax of the limit() and sort() method?

1 Answer

0 votes
by
Syntax of the limit() method is:

>db.COLLECTION_NAME.find().limit(NUMBER)

 Syntax of the sort() method is:

>db.COLLECTION_NAME.find().sort({KEY:1})

Related questions

0 votes
asked Jun 17, 2020 in MongoDB by AdilsonLima
0 votes
asked Mar 6, 2022 in VueJS by sharadyadav1986
...