Start a new topic

angular js map/reduce


I would like to make a plot, showing how many events occured each day. Every event has a timestamp (e.g. 2013-10-22T09:19:01.531Z).

I need to call map function to group events by day (by igronring hours, minutes etc.) and then reduce data by count function.

I can't understand how I can pass mapping function by kinvey api for angularjs. please help.

Hi Mike,

I cannot be sure, but I don't think this functionality exists. I think you are looking for custom grouping functions, something that came up in a different post we made a while back. Kinvey recommended utilizing a custom endpoint for these kind of complex queries.
Thanks for reply!

CustomEndpoint collectionAccess module has mapReduce(map, reduce, options, callback) method - so my endpoint will just pass incoming map parameter in mapReduce method. I thought it might be already done by API.
Login or Signup to post a comment