Documentation

map

transforms the initial calling array according to the functor

array map(function functor,object master);

Parameters

functorfunctionthe method which needs executing
masterobjectthe object that the method should be applied to

Returns

arraythe transformed initial array

See also

Example

view:"datatable",
scheme:{
    $group:{
        by:"year",
        map:{
            votes:["votes", "sum"]
        }
    }
}

Back to top