mongoose ObjectId.toString()

node中一般我们经常对id进行判断,有的id是string类型,有的是ObjectId(''),这时候就可以使用mongoose的toString方法,将它转换成string

原文地址:https://www.cnblogs.com/jintaostudy/p/9188164.html