-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.6.5
-
Component/s: Aggregation Framework
-
None
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
The following confuses me:
Data:
db.foo.insert({name: "Hello"})
Operation:
db.foo.aggregate({$project: { "_id": 0, "Hello" : {$map: {input: ["$name"], as: "whee", in: "$$whee"} } }})
Result:
{ "Hello" : [ "$name" ] }
Somehow I would have expected $name to be expanded to "Hello".
I'm sure there's a good reason that doesn't happen, but I couldn't find anything on the site that explains exactly what's going on here