Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
None
-
2.6.5
-
None
-
ALL
Description
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 ![]()