0

I'm having trouble to find the way to delete a list item inside an Embedded document using mongo engine.

Document structure:

{
    "_id" : "id",
    "user" : ObjectId("xxxxxxx"),
    "invoice" : false,
    "coupon" : ObjectId("xxxxxxx"),
    "date" : ISODate("2017-03-31T11:32:57.467Z"),
    "orders" : [ 
        {
            "products" : [ 
                ObjectId("xxxxxxx")
            ]
        }
    ],
    "shipping_address" : {
    },
}

Using this structure, what I want to achieve, is to delete the id inside the products list inside the orders embedded document.

Any idea? any help would be really appreciated

0 Answers0