I'm trying to find a user by their social services using service type and account id, but I don't know how to do this as a Mongoose query.
For example, how would I find this user, using Mongoose, if I have 'twitter' and '789DEF'?
{
"email":"[email protected]",
"social": [
{
"service": "linkedin",
"username": "Test User",
"url": "https://www.linkedin.com/in/testuser",
"accountId": "ABC12356"
},
{
"service": "twitter",
"username": "TestUser",
"url": "https://www.twitter.com/testuser",
"accountId": "789DEF"
}
]
}