I have a list of different Ids , and I'm trying to find the products that have those Ids and push them in another array. The problem is that when I use findOne() return the same product for all Ids.
let wishpro = ['632a5e5rtybdaafd23','65fdaartbdqip55'];
for(let i = 0; i < wishpro.length ; i++) {
let x = await product.findOne({id : wishpro[i]});
console.log("x : " + x.id )
wishProducts.push(x);
}