DEV Community

Suhana
Suhana

Posted on

How to find latest document for all ids in the list of ids?

I have a database Book(id, author, createdAt, updatedAt) in mongodb. Now, I have list of authors and want to find their latest book of every author in the list.
Can anyone help me resolve this? Thanks in advance

Top comments (0)