title: MongoDB Scala driver including specific fields from embedded documents
body: <p>In a MongoDB query, it's possible to aggregate and include specific fields from embedded documents.</p>
  
  <p><a href="https://docs.mongodb.com/manual/reference/operator/aggregation/project/" rel="nofollow">MongoDB manual</a> section: Include Specific Fields from Embedded Documents</p>
  
  <p>Example query:</p>
  
  <pre><code>db.getCollection('test')
  .aggregate([ 
      { $project : { "name" : "$subLevel.name" , _id: 1 } }
  ])
  </code></pre>
  
  <p>So a document like:</p>
  
  <pre><code>{
      "_id": "id1",
      "sublevel":{
          "name": "name1"
      }
  }
  </code></pre>
  
  <p>is aggregated to:</p>
  
  <pre><code>{
      "_id": "id1",
      "name": "name1"
  }
  </code></pre>
  
  <p>However, I can't find the option to do this with the mongoDB Scala driver.
  <a href="http://mongodb.github.io/mongo-scala-driver/1.0/scaladoc/#org.mongodb.scala.model.Projections$" rel="nofollow">org.mongodb.scala.model.Projections</a></p>
  
  <p>Does somebody have an idea on how to do this?</p>