On this page本页内容
cursor.map(function)¶mongo Shell Method
This page documents the 本页记录了mongo shell method, and does not refer to the MongoDB Node.js driver (or any other driver) method. mongo shell方法,未提及MongoDB Node.js驱动程序(或任何其他驱动程序)方法。For corresponding MongoDB driver API, refer to your specific MongoDB driver documentation instead.有关相应的MongoDB驱动程序API,请参阅特定的MongoDB驱动程序文档。
Applies 将function to each document visited by the cursor and collects the return values from successive application into an array.function应用于游标访问的每个文档,并将后续应用程序的返回值收集到一个数组中。
The cursor.map() method has the following parameter:cursor.map()方法具有以下参数:
function |
See also参阅
cursor.forEach() for similar functionality.用于类似的功能。