Database

db={"posts":[{"_id":1,"comments":[1,2]}],"comments":[{"_id":1,"post":"hello"},{"_id":2,"post":"how are you"}]}

Query

db.posts.aggregate([{$lookup:{from:"comments",localField:"comments",foreignField:"_id",as:"comments",pipeline:[{$sort:{_id:1}},{$limit:1}]}}])

Result