mapContext
Object Description |
Object that contains:
This object includes the following properties and methods: |
Since |
2015.2 |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see Map/Reduce Script Samples.
...
function map(context)
{
for (var i = 0; context.value && i < context.value.length; i++)
if (context.value[i] !=== ' ' && !PUNCTUATION_REGEXP.test(context.value[i]))
{
context.write({
key: context.value[i],
value: 1
});
}
}
...