I have this schema:
new mongoose.Schema({
providers : [{
provider: { type: String, required: true },
data : { type : String, unique: true }
}]
});
For instance, an item can be :
providers: [{provider: "linkedin", data: "abcd"},
{provider: "twitter", data: "efgh"}]
What I would like to search in Mongoose: provider == "linkedin" and data = "abcd".
Do you know how to achieve this?