title: How to do field selection on find() in the mongodb native driver?
body: <p>I am using the mongodb native driver for node.js and can't get to work the field selection. What I want to do is to limit fields to name. I do not want the 'last' in the output.  </p>
  
  <p>I am doing this:</p>
  
  <pre><code>db.collection("test").find({},[{'name':true,'last':false}]).toArray(function(err, results) {
      console.dir(results);
  });
  </code></pre>
  
  <p>But the log prints:</p>
  
  <pre><code>[ { _id: 524b53588aa4f388de1c2ddb },
    { _id: 524b53548aa4f388de1c2dda } ]
  </code></pre>
  
  <p>So there is no <code>name</code> in the output. </p>
  
  <hr>
  
  <p><strong>Update</strong>:
  I have tried an object instead of array -- did not work. The reason is really mixing inclusion and exclusion.  You can't mix it. When I only had <code>"name":true</code> it worked.</p>