How I can use sort function in findOne() function?

``
`await collections.find({})
.sort({ timestamp: -1 })
.limit(1)
.hint({ timestamp: -1 })
.toArray();

@Abul_Fazal1 , you can also use this way as well
1 Like