lets say we have an array of user ids :
"ids": [
"623d71c628820d09797be558",
"62419d6477775214de099838",
"62419d7877775214de099845",
"62419d8877775214de09984c"
]
and we want to return the first 10 documents of every id sorted by date. I know we can do :
const docs = await Model.find({ id: { $in: ids } })
.sort("date")
.limit(10);
which returns 10 documents sorted by date,but not for every user,how could i return 10 for every one in array ?