On this page
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.