title: How to find a subdocument by id in mongoose and exclude some fields
body: <p>I have the a document stored in mongodb:</p>
  
  <pre><code>shop: {
    _id: '...'
    title: 'my shop'
    users: [
      {
        _id: '...',
        name: 'user1',
        username: '...'
      },
      {
        _id: '...',
        name: 'user2',
        username: '...'
      }
    ]
  }
  </code></pre>
  
  <p>I use this query to get a subdocument user by his id:</p>
  
  <pre><code>Shop.findOne({'users._id': userId}, {'users.$': 1}, function (err, user) {
    console.log(user);
  });
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>{ _id: ...,
    users: 
     [{
       name: 'user1',
       username: '...',
       _id: ...
      }]
  }
  </code></pre>
  
  <p>How can I filter the result to only return the user name.
  The way I do it now:</p>
  
  <pre><code>Shop.findOne({'users._id': userId}, {'users.$': 1}, function (err, shop) {
    shop = shop.toObject()
    user = shop.users[0]
    filtered = {
      name: user.name
    }
    callback(filtered);
  });
  </code></pre>
  
  <p>But is there a better way to do it all in the query?</p>