I got stuck in mongodb aggregation. I have a document like this in mongodb, we have details array in doc.
{ user: "userName1", details: [{