On this page
map( function )
functionto each document visited by the cursor and collects the return values from successive application into an array.
cursor.map()method has the following parameter:
Parameter Type Description
function A function to apply to each document visited by the cursor.
cursor.forEach() for similar functionality.