title: Mongodb $exist not working
body: <p>Ok I am not sure why this is not working I know the field is there because it has sub arrays in this mydetails field.</p>
  
  <pre><code>function firsttime($uid){
          $collection = static::db()-&gt;members;
          var_dump($collection-&gt;findOne(array("_id"=&gt; new MongoId($uid), array("mydetails"=&gt; array('$exists' =&gt; true)))));
  
      }
  </code></pre>
  
  <p>all it returns is NULL
  is there a better way to find if there is or is not a field </p>
  
  <p>in this example I want to see if the field mydetails exist?</p>
  
  <p>It would be nice if I could either have a true or false return.</p>
  
  <p>an example data</p>
  
  <pre><code>array (
    '_id' =&gt; new MongoId("53b9ea3ae7fda8863c8b4568"),
    'mydetails' =&gt; 
    array (
      'name' =&gt; 
      array (
        'first' =&gt; 'Russell',
        'last' =&gt; 'Harrower',
      ),
      'email' =&gt; 'hidden@ipet.xyz',
      'birthday' =&gt; 
      array (
        'day' =&gt; '02',
        'month' =&gt; '02',
        'year' =&gt; '1988',
      ),
    )
  )
  </code></pre>