title: MongoDB query check if value in array property
body: <p>I cannot find out of how to check, if some value are in array property in mongo document.
  For example, I have some collection users, and such document:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>{
    'name':'Paul',
    'age':43,
    'friendsIDs': [ ObjectId('qqq...'), ObjectId('www...'), ObjectId('eee...') ],
  }
  </code></pre>
  
  <p>Now let's suppose that I want to check, is user with ID ObjectId('qqq...') a friend of Paul, or not.
  This is quite easy to do in almost all programming languages, for example in php it would be something like:</p>
  
  <pre class="lang-js prettyprint-override"><code>$isFriendOfPaul = in_array( ObjectId('qqq...'), $friendsIds );
  </code></pre>
  
  <p>But how to query this in mongo? Any ideas?</p>