Mongodb – How to group by a part of string?
I have this data in MongoDB. { _id: "abc*hello*today*123", "value": 123 }, { _id: "abc*hello*today*999", "value": 999 }, { _id: "xyz*hello*tomorrow*123", "value": 123 } What I want is to group by the first part before "*{number}". This is what I…