- Reference >
- mongoShell Methods >
- Cursor Methods >
- cursor.pretty()
cursor.pretty()¶
On this page
Definition¶
- 
cursor.pretty()¶
- mongoShell Method- This page documents the - mongoshell method, and does not refer to the MongoDB Node.js driver (or any other driver) method. For corresponding MongoDB driver API, refer to your specific MongoDB driver documentation instead.- Configures the cursor to display results in an easy-to-read format. - The - pretty()method has the following prototype form:
Examples¶
Consider the following document:
By default, db.collection.find() returns data in a dense format:
By using cursor.pretty() you can set the cursor to return data in a
format that is easier for humans to parse: