PyMongo aggregation no result
1 answer
Collection.aggregate
returns a dictionary like
{'ok': 1 or 0, 'result': the_actual_result}
Thus,
list(my_collection.aggregate(...))
iterates over the dictionary, getting a list of keys ['ok', 'result']
.
+3
source to share