我有一个像这样的mongoose模式:
const userSchema = new Schema( {
email:{ type: String, required: true, unique:true, index:true },
mobile:{ type: String },
phone:{ type: String },
firstname: { type: String },
lastname: { type: String },
profile_pic:{type:String},
socialHandles: {
type: Map,
of: String
},
active: {type:Boolean, default:true}
}, {
timestamps: true
} );
我想查询“给我socialHandles.instagram=jondoe的用户”,该如何操作?请帮忙。
socialHandles.${platform}
]:handle}); - Ali Nahid