Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
Description
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
Attachments
Issue Links
- duplicates
-
SERVER-30417 add expression to get value by keyname from object
-
- Closed
-