Answers for "convert string array to objectid mongoose"

0

convert string array to objectid mongoose

let objectIdArray = stringObjectIdArray.map(s => mongoose.Types.ObjectId(s));
//or
let objectIdArray = stringObjectIdArray.map(mongoose.Types.ObjectId);
Posted by: Guest on August-11-2021

Code answers related to "convert string array to objectid mongoose"

Code answers related to "Javascript"

Browse Popular Code Answers by Language