I want to convert ObjectID (Mongodb) to String in JavaScript.
When I get a Object form MongoDB. it like as a object has: timestamp, second, inc, machine.
I can\'t convert to
this works, You have mongodb object: ObjectId(507f191e810c19729de860ea),
to get string value of _id, you just say ObjectId(507f191e810c19729de860ea).valueOf();