how can i aggregate the data in node red?
- i am using node-red-contrib-mongodb2
[{"id":"a5d3fca9.1d6fb","type":"mongodb2 in","z":"17988aef.77ac65","service":"_ext_","configNode":"60e6b2b.5c7bc4c","name":"","collection":"cars","operation":"aggregate.toArray","x":670,"y":180,"wires":[["60a016a6.c089f8"]]},{"id":"60e6b2b.5c7bc4c","type":"mongodb2","z":"","uri":"mongodb://192.168.3.179:27017/testdb","name":"db","options":"","parallelism":"-1"}]
- i didnt understand how
Usage
Nodes to save and retrieve data in a local MongoDB instance.
Optionally, you may also (via a function) set
- a
msg.projectionobject to constrain the returned fields, - a
msg.sortobject, - a
msg.limitnumber, - a
msg.skipnumber.
You can either set the collection method in the node config or on msg.collection . Setting it in the node will override msg.collection .
this works ...
thanks if anyone can help~