Start a new topic

Business Logic collection.group example

Please could you provide an example of the .group() method of the collection class?  I am using the following, which run with no error, but doesn't provide any results.


database.collection("Messages")

  .group({"product": true}, {}, {"count":0}, function (obj, prev) { prev.count++; }, function(error, results) {

       // some code

  });

Login or Signup to post a comment