I've this query:
produits = yield motor.Op(db.users.aggregate, [{"$unwind":"$pup"},{"$match":{"pup.spec.np":nomp}}, {"$group":{"_id":"$pup.spec.id","pup":{"$push":"$pup"}}}])
which gives me this result:
print produits
{u'ok': 1.0, u'result': [{u'_id': None, u'pup': [{u'avt': {u'fto': ..all the results}}]}]}
so I can do:
prod = produits["result"]
[{u'_id': None, u'pup': [{u'avt': {u'fto': ..all the results}}]}]
but how can I hide "_id"
so that I can only get:
[{u'pup': [{u'avt': {u'fto': ..all the results}}]}]
in a normal query I would simply add something like {"_id":0}
but here it doesn't work.