christkv/node-mongodb-native — Issue #456: Collection.group doesn't return nested keys after v0.9.7-1.4
Author: jamarparris
Created: 2011-12-20 22:20:05+00:00
State: open

In version 0.9.7-1.4 whenever I did a collection.group, and specified a nested key (example below), it would return that nested key as part of the document along with the results of the group. With the most recent version, the nested key is no longer returned. If I use a non-nested key, it works just fine.

```javascript
var keys = {
"data.lastname": true
};

var condition = {
"data.date": {
$gte: start,
$lte: end
}
};

var initial = {
count : 0
};

var reduce = function(doc, output) {
output.count++;
}
```

In the example below, in v 0.9.7-1.4 it returns the following:

```javascript
[{ "data.lastname": "smith", count: 10}]
```

In the latest version it returns:

```javascript
[{count: 10}]
```