Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
OSX terminal
*Location*: https://docs.mongodb.org/getting-started/node/aggregation/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:44.0) Gecko/20100101 Firefox/44.0
*Referrer*: https://docs.mongodb.org/getting-started/node/remove/
*Screen Resolution*: 1280 x 800
*repo*: docs
*source*: aggregation
OSX terminal *Location*: https://docs.mongodb.org/getting-started/node/aggregation/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:44.0) Gecko/20100101 Firefox/44.0 *Referrer*: https://docs.mongodb.org/getting-started/node/remove/ *Screen Resolution*: 1280 x 800 *repo*: docs *source*: aggregation
Description
the functions on this page do not run properly in the node shell
> var aggregateRestaurants = function(db, callback) {
... db.collection('restaurants').aggregate(
..... [
..... { $match:
},
..... { $group: { "_id": "$address.zipcode" , "count":
} }
..... ]).toArray(function(err, result)
SyntaxError: missing ) after argument list
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:225:25)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:417:12)
at emitOne (events.js:95:20)
at REPLServer.emit (events.js:182:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
> );
... };