📅  最后修改于: 2022-03-11 15:01:37.536000             🧑  作者: Mango
let objectIdArray = stringObjectIdArray.map(s => mongoose.Types.ObjectId(s));
//or
let objectIdArray = stringObjectIdArray.map(mongoose.Types.ObjectId);