You can use a for loop iterate over the array of ids and and use Document.find(id)
multiple times.
const ids = ["5ffd5eb822084969b4dc9f74","5ffd5eb822084969b4dc9f74"];
const result = [];
// Loop through each element
ids.forEach(async(id) => {
const foundResult = await Document.find({_id: id});
result.push(foundResult);
})
Then you can use the result array.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…