Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
db.foo.find().forEach(printjson);
db.foo.mapReduce(
function () {
emit (this["First Name"].toLowerCase().split('')[0], 1);
},
function (key,value) {
return Array.sum(value);
},
{
out : "foo_out"
}
);
db.foo_out.find().forEach(printjson);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment