[14:34:21] <cubud> I am running an aggregate on a collection. Could someone tell me how to remap the final result into a flatter structure please? https://hastebin.com/usevafoguy.pl
[14:38:01] <cubud> Just posted it on StackOverflow https://stackoverflow.com/questions/50137308/how-do-i-flatten-the-results-of-an-aggregation
[15:24:03] <cubud> Can I do a kind of switch statement in the projection? So I can say "if Status = 40 then '5'" etc
[15:24:38] <cubud> I want to show alternative values, because I want to map them to show the values that are used in another system (the equivalent values)
[17:48:35] <wrkrcoop> hello. i just joined a project and i’m new to mongo. they want to create a feature where we show the user events related to a project (kinda like github)
[17:48:45] <wrkrcoop> an event is associated with a project which is a collection
[17:49:23] <wrkrcoop> bubt here’s the thing. i imagine they’re going to want two things: to see events related to a company so all events across projecrts. and to see events related to just a project.
[17:50:17] <wrkrcoop> if i create an event and tie it to projects then i can get events but not for a company, if i tie the event to the company i can get all events for a company but not a project. is there a way i can get both the events for a company (all events) and events for just a proejct?
[17:53:20] <wrkrcoop> also can i do pagination in reverse chronological order?