node-mapred
Map Reduce implementation of mongodb for nodejs
Description
This lib would help you to apply mongodb mapReduce operation on array of objects
Usecases
- For Example if you want to apply mapReduce operation on documents after aggregation pipeline then you may pass the result to this lib and perform Map Reduce operation
- If you have a list of data that you want to combine by some department or etc criteria
Installation
npm i node-mapred --save
Usage
var MapRed = ; var mapred = ; var info = type: "fruit" name: "apples" qty: 21 type: "fruit" name: "mangoes" qty: 23 type: "fruit" name: "apples" qty: 2 type: "fruit" name: "mangoes" qty: 3 type: "animal" name: "dogs" qty: 3 type: "animal" name: "cats" qty: 3 type: "animal" name: "dogs" qty: 7 mapred mapred
Test
npm install
npm test
License
MIT