An attempt to work out a map is reduced by mongo, which will use the field value as the parameter name of the emitted object.
Just what I need to do is the following:
emit_object = {} param_name = "param1" param_value = 1 emit_object.param_name = param_value
The object I want to build:
{ "param1" : 12 }
Nevertheless, the constructed construction is as follows:
{ "param_name" : 12 }
Does JS support this "dynamic" behavior of the object construct? (Mongo uses the SeaMonkey JS engine, if relevant).
Thank you, Maxim.
source share