mongoose中的 find 和 findOne 都是用来查找指定表的数据的html
find指的是查找指定表的全部数据,返回的是数组数组
User.find().then((result)=>{ console.log(result) //返回一个数组 })
findOne指的是查找指定表的单条数据,返回一个对象mongoose
User.findOne({name:"huang"}).then((result)=>{ console.log(result); //返回一个对象 })
获取 “huang” 能够用 result.namehtm