title: Mongoose select fields (nested)
body: <p>I am trying to use the select operator in mongoose to select certain fields for the following object:</p>
  
  <pre><code>{
      "_id" : ObjectId("5249bb97a5de48bda3000003"),
      "id": 1,
      "geometry" : {
          "coordinates" : [
              1,
              1
          ],
          "type" : "Point"
      },
      "properties" : {
          "TYPE" : "Some Type",
              "TIMESTAMP": ......
      },
      "type" : "Feature"
  }
  </code></pre>
  
  <p>I would like to mongo to return only the 'properties.TYPE' and properties.TIMESTAMP fields.  I can do this in mongo with the following query:</p>
  
  <pre><code>db.features.find({id: 1}, {'properties.TYPE': 1, 'properties.TIMESTAMP': 1})
  </code></pre>
  
  <p>I am trying to use the select statement in mongoose to do the same thing:
    var fields = { 
      properties: { OBJECTID: 1, TIMESTAMP: 1 }
    }
    var query = Feature.find({id: 1}).select(fields);</p>
  
  <p>Mongo throws an error when trying to do that so I am not sure mongoose is formatting a nested fields object correctly.</p>
  
  <p>Is this the proper way to do this?</p>