If I put a variable with an undefined value into the "scope" parameter of mapReduce(), then the map function will receive the variable with a null value (instead of the undefined value). Is that correct?
For example (javascript skeleton for the "mongo" command):
db.mycol.mapReduce(
f_map,
f_reduce,
{
scope: { myvar: undefined}
}
);
function f_map()
{
print("myvar: " + myvar);
}
That will print "myvar: null" (instead of "myvar: undefined") into the server log (into the replicaset member log). Are undefined values converted automatically to null values when passing through mapReduce()?