- Reference >
mongoshMethods >- Bulk Operation Methods >
- Bulk.toJSON()
Bulk.toJSON()¶
On this page
-
Bulk.toJSON()¶ Returns a JSON document that contains the number of operations and batches in the
Bulk()object.
Example¶
The following initializes a Bulk() operations builder on the
items collection, adds a series of write operations, and calls
Bulk.toJSON() on the bulk builder object.
The Bulk.toJSON() returns the following JSON document
See also