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 aggregation to group by multiple fields

I have following data in my collection { “name": “test”, "data": { “statusOne”: “enabled”, “statusTwo”: “active” } } { “name": “test”, "data": { “statusOne”: “disabled”, “statusTwo”: “active” } } { “name": “another-test”, "data": { “statusOne”: “disabled”, “statusTwo”: “active” } }…

VIEW QUESTION
Back To Top
Search