- Reference >
- JavaScript Methods >
- cursor.map()
cursor.map()¶
-
cursor.
map
(function)¶ Parameters: - function – function to apply to each document visited by the cursor.
Apply function to each document visited by the cursor, and collect the return values from successive application into an array. Consider the following example:
See also
cursor.forEach()
for similar functionality.