比如要根据下面这个数据库的collects的某个值查询:
var UserSchema =new Schema({
name:String,
collects:[
{
pic:String,
title:String,
raiting:String,
slogo:String,
evaluate:String,
labels:Array,
collected:Boolean
}
],
})
语法:
var isHave = await UserModel.find({"collects.pic":这里是要查询的值});