pymongo get field from aggregation code example
Example: mongodb project all fields
db.collection.aggregate([
{ "$addFields": { "custom_field": "$obj.obj_field1" } }
])
db.collection.aggregate([
{ "$addFields": { "custom_field": "$obj.obj_field1" } }
])