title: Retrive a set of documents from array in MongoDB using Java driver
body: <p>I have a MongoDB document structure like this:</p>
  
  <pre><code>{ 
    "name": "list"
    "config": "default"
    "items": [
      {
        "email": "user1@mail.com"
        "status": true
        "number": 123
      },
      ...
      {
        "email": "user100@mail.com"
        "status": false
        "number": 432
      },
     ]
  }
  </code></pre>
  
  <p>Now, how can I retrive multiple subdocuments that much certain criteria. For instance, I want to obtain all documents where <strong><em>status = true</em></strong>. I know that it is possible to use <strong>$elemMatch</strong>, but it returns only the first matching instance and I need <strong>ALL</strong> documents that correspond to the specified condition. Please show how can it be done with Java.</p>