0

I know you could do Coll.findOne({ email_1: '[email protected]' }) to look up [email protected] against the field email_1 in collection Coll. However, what if there were several email fields (email_1, email_2, email_3, etc.) and I needed to look up a given email against all those fields?

I could reiterate Coll.findOne({ email_1: '[email protected]' }) for each field in my collection but that obviously isn't most optimal.

TheLearner
  • 2,813
  • 5
  • 46
  • 94

0 Answers0