Reputation: 1099
I have a collection in MongoDb called items items contain two types of item 1) pizza 2) drinks
how I query just the pizza if my mongoose schema was like this:
let items = new Schema({
pizza: {
name: String,
price: [Number],
subType: [String]
},
drinks : {
name: String,
price: Number,
}
})
Upvotes: 2
Views: 75