I want to match the value of address, from an object of arrays holding objects:
email: {
verified: [
{
token: "gCCt1IUKXPfB4Lj3q_t2vDfiUhis87Ki7mVuR3YLDRD",
address: "[email protected]",
when: ISODate("2017-01-06T11:40:22.293Z")
}
]
}
This didn't work:
Meteor.users.findOne({email: {$elemMatch: {address: email}}})
How can you do it when there's an array to traverse?