var test = res[0]._id.toHexString(); // получаем hex-строку require("mongoose").Types.ObjectId(test); // получаем ObjectId When I call ObjectId, I get an error: Type error: hex is not a function.
var test = res[0]._id.toHexString(); // получаем hex-строку require("mongoose").Types.ObjectId(test); // получаем ObjectId When I call ObjectId, I get an error: Type error: hex is not a function.
Source: https://ru.stackoverflow.com/questions/615020/
All Articles
hexis not a function. - Grundy