1

I would like to do something like this:

db.getCollection("myColl").aggregate(
    [
        { 
            "$match" : {
                "some.field" : "VALUE"
            }
        }, 
        { 
            "$group" : {
                "_id" : "$some.field.bla",
                "mContent": {
                    "$push":JSON.parse("$field.contents")   
                }
            }
        }
    ], 
    { 
        "allowDiskUse" : true
    }
);

Now, that doesn't work. But how would I achieve this? I imagine in a subsequent aggregation step.

user3813234
  • 1,580
  • 1
  • 29
  • 44

0 Answers0