-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
can we hav an aggregation operator like "$arrayElemAt"
but instead of working on array the input is a document
The <document> expression can be any valid expression as long as it resolves to a document.
The <key> expression can be any valid expression as long as it resolves to a String.
Behavio
Example -> Results
{ $elemAt: [ \{k1:"v1",k2:"v2"}, "k1" ] } -> "v1"
{ $elemAt: [ \{k1:"v1",k2:"v2"}, "k3" ] } -> null
- duplicates
-
SERVER-30417 add expression to get value by keyname from object
- Closed