Konwertuj tablicę ciągów na Mongoose obiektywu

let objectIdArray = stringObjectIdArray.map(s => mongoose.Types.ObjectId(s));
//or
let objectIdArray = stringObjectIdArray.map(mongoose.Types.ObjectId);
Jaimin Patel