skip to Main Content

String aggregation in MongoDB

I have a collection of documents as follows: { "id": ..., "key": 47 }, { "id": ..., "key": 12 } I want to aggregate the whole collection to a single string, by concatenating the keys, delimited by |. So here,…

VIEW QUESTION

Mongodb Aggregate events between two events

I have a collection made like this [ {timestamp: xxx, type:'start'}, {timestamp: xxx, type:'log'}, {timestamp: xxx, type:'log'}, {timestamp: xxx, type:'log'}, {timestamp: xxx, type:'start'}, {timestamp: xxx, type:'log'}, {timestamp: xxx, type:'log'} ] how do I aggregate the start event and the log…

VIEW QUESTION
Back To Top
Search