Hi. I am running a query on my mongodb using the driver and writing the code in javascript. I am quite new to this.
So my question is , after i run the query i get the results for each individual document with the field i am querrying. How can i combine all of those results to give me one number. I am posting my results below.
As you can see above i get three results , one for each document. How can I add those field values together. Dont know if it is a javascript or mongo technique.
Noi understand how to run the aggregation inmongo and a query in JS. My question is how do i add all the individual values from a certain field in al the different documents together.