title: How to match an element in array? MongoDB aggregation
body: <p>I need to check all the documents whose <strong>specific field</strong> is contained in an array.</p>
  <p>For example I have the array</p>
  <pre><code>arr = ['a', 'b', 'a']
  </code></pre>
  <p>I want to match all the documents that has field <code>my_letter</code> equal to <code>a or b</code>.</p>
  <p>I have the documents:</p>
  <pre><code>[
    {
      _id: ObjectID(),
      my_letter:'d'
    },
    {
      _id: ObjectID(),
      my_letter:'a'
    },
    {
      _id: ObjectID(),
      my_letter:'b'
    }
  ]
  </code></pre>
  <p>I want the aggregation to return</p>
  <pre><code>[
    {
      _id: ObjectID(),
      my_letter:'a'
    },
    {
      _id: ObjectID(),
      my_letter:'b'
    }
  ]
  </code></pre>
  <p>I tried this in my <code>$match</code> pipeline</p>
  <pre><code>{
    $match: {
      _id: {
        $elemMatch: {
          $or: [
            { $eq: [&quot;a&quot;] },
            { $eq: [&quot;b&quot;] },
          ],
        },
      },
    },
  },
  </code></pre>
  <p>Of course it doesn't work. How would You suggest to complete the $match pipeline?</p>