-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
I would like to use the $set operator and dot notation to update embedded array elements, using corresponding old elements.
However, if the field is member of an array by selecting it you are selecting all of them.
{{{ar :[
{"a" : 1},
{"a" : 2}]}}}
"$ar.a" = [1 ,2]
{{}}
Suggestions:
a) Extra dot operator for element wise access:
{{}}{{"$ar:a" = 1 (for one case and 2 for the other )
}}
b) Suppport of positional operator in $set stage
"$ar.$.a"
{{}}
{{Also see
}}{{}}