I want to query MongoDB using Mongoose with an array of objectIDs. I am not sure how to do this and also get back the 'name' property that is on the root of each document. I've looked online and can't seem to get it working. Below are two things I have tried that might be close but don't work.
{ _id: {
$in : ['5d193a4826540f7a89757f1d']
}
}
{ "name" : {
id: {
$in : ['5d193a4826540f7a89757f1d', '5d8c104d0f867b753d1f506c']
}
}}