Database

db={"store":[{"id":ObjectId("63da2f1f7662144569f78ddd"),"name":"bat","price":56,},{"id":ObjectId("63da2f1f7662144569f78ddc"),"name":"ball","price":58,},{"id":ObjectId("63da2f1f7662144569f78ddb"),"name":"cap","price":100,},{"id":ObjectId("63da2f1f7662144569f78dda"),"name":"red","price":50,},],"store1":[{"id":ObjectId("63da2f1f7662144569f78dd6"),"name":"bat","price":56,},{"id":ObjectId("63da2f1f7662144569f78dd7"),"name":"ball","price":58,},{"id":ObjectId("63da2f1f7662144569f78dd9"),"name":"cap","price":100,},{"id":ObjectId("63da2f1f7662144569f78dd8"),"name":"red","price":50,},]}

Query

db.store.aggregate([{"$lookup":{"from":"store1",pipeline:[{$match:{$expr:{"$in":["$id",{"$map":{/** your payload from client here*/"input":["63da2f1f7662144569f78dd6","63da2f1f7662144569f78dd7",],"as":"id","in":{"$toObjectId":"$$id"}}}]}}},],as:"store1"}},{$match:{$expr:{"$in":["$id",{"$map":{/** your payload from client here*/"input":["63da2f1f7662144569f78ddd","63da2f1f7662144569f78ddb","63da2f1f7662144569f78dda"],"as":"id","in":{"$toObjectId":"$$id"}}}]}}},{$project:{_id:0,}}])

Result