Mongoose find()未返回所需结果
正在尝试从mongooseMongoose find()未返回所需结果,mongoose,Mongoose,正在尝试从mongoosefind()命令获取数组 我在使用findOne()时获得了所需的结果,但此结果应返回多条记录 代码如下: const docs = await Gift.find(); console.log(docs); 结果如下: (30) [model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model,
find()
命令获取数组
我在使用findOne()
时获得了所需的结果,但此结果应返回多条记录
代码如下:
const docs = await Gift.find();
console.log(docs);
结果如下:
(30) [model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model]
Mongo收藏中有30个文档