Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
3.5.6
-
None
-
Minor Change
-
ALL
-
v3.4
-
Query 2017-07-10
Description
If my object is o:{ "foo": null } and {$objectToArray:"$o"} converts it to {k:"foo",v:null} then $arrayToObject must be able to convert it back to the object, but instead it gives the error:
Error: command failed: {
|
"ok" : 0,
|
"errmsg" : "$arrayToObject requires an object with keys 'k' and 'v'. Missing either or both keys from: {k: \"comment\", v: null}",
|
"code" : 40393,
|
"codeName" : "Location40393"
|
}
|
Explicit null is a different type than missing, so we're probably checking for "nullish" when we should be checking for "missing".