adspace


How to convert string to objectid in mongoose?

Answer Posted / Nikhil Gupta

To convert a string to an ObjectId in Mongoose, you can use the `mongoose.Types.ObjectId(yourString)` method.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How did mongodb get its name?

60


How to define array in mongoose schema?

79


what is the command syntax for inserting a document?

62