Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
Compass
/ /

View Documents

The Documents tab provides three ways to access documents:

List View
The default document view. Documents are shown as individual members of a list. In this view you can easily expand embedded objects and arrays.
JSON View
Documents are shown as properly-formatted JSON objects. In this view Compass uses extended JSON to display the data types of fields where appropriate.
Table View
Shows documents as rows of a table, with document fields shown in the table columns. With this view, you can more easily see which documents contain specific field values.

Use the View buttons to select which view is shown in the following examples:

Documents list view
click to enlarge
Documents in JSON view
click to enlarge

You can reorder the table columns by clicking and dragging the column headings. Reordering the columns is a strictly cosmetic change and does not change the underlying data itself.

Documents in Table view
click to enlarge

To expand all objects in all documents in your collection in List View or JSON View, you can right-click the query bar or its surrounding whitespace. Then, select Expand all documents from the drop-down menu.

Right click bar to expand documents

To expand individual documents, follow the instructions below.

To toggle the expansion of embedded objects and array elements, hover over the target document and click the arrow in the top-left corner.

Expand embedded objects list
click to enlarge

Alternatively, you can right-click on the document you want to expand and select Expand all fields from the drop-down menu.

To toggle the expansion of embedded objects and array elements, hover over the target document and click the top arrow on the left side of the document.

To expand individual objects and arrays, click the arrow to the left of the desired field.

Expand embedded objects JSON
click to enlarge

Alternatively, you can right-click on the document you want to expand and select Expand all fields from the drop-down menu.

To view nested object fields and array elements, hover your cursor over a field with a value type of Object or Array and click the button with outward-pointing arrows which appears on the right side of the field.

Compass opens a new tab in the Table View corresponding to the nested element.

View nested elements in Table view
click to enlarge

The following example displays the address object nested within the restaurants collection documents. The new tab displays the five properties of the address object:

Nested documents
click to enlarge

To return to the original table display, click on the first tab in the Table View which displays the name of your collection.

To copy a document to your clipboard, hover over the document and click the Copy icon:

Copy Document from List View
click to enlarge

You can also right-click on the document and select Copy document from the drop-down menu.

Additionally, if you right-click a specific field or value, you can copy that field/value pair by selecting Copy field & value from the drop-down menu.

To copy a document to your clipboard, hover over the document and click the Copy icon:

Copy Document from JSON View
click to enlarge

You can also right-click on the document and select Copy document from the drop-down menu.

To copy a document to your clipboard, hover over the document and click the Copy icon:

Copy Document from Table View
click to enlarge

Compass obscures document fields encrypted with Field-Level Encryption (FLE). Compass displays the values of these fields as a series of asterisks.

Encrypted field in list view
click to enlarge

If your deployment is connected using In-Use Encryption and your collection is configured with Queryable Encryption, you can toggle the In-Use Encryption connection option.

  • When In-Use Encryption is enabled, you can modify and view the encrypted values and fields.

  • When In-Use Encryption is disabled, Compass displays the values of these fields as a series of asterisks.

Compass obscures document fields encrypted with Field-Level Encryption (FLE). Compass displays the values of these fields as a series of asterisks.

If your deployment is connected using In-Use Encryption and your collection is configured with Queryable Encryption, you can toggle the In-Use Encryption connection option.

  • When In-Use Encryption is enabled, you can modify and view the encrypted values and fields.

  • When In-Use Encryption is disabled, Compass displays the values of these fields as a series of asterisks.

Compass obscures document fields encrypted with Field-Level Encryption (FLE). Compass displays the values of these fields as a series of asterisks.

Encrypted field in table view
click to enlarge

If your deployment is connected using In-Use Encryption and your collection is configured with Queryable Encryption, you can toggle the In-Use Encryption connection option.

  • When In-Use Encryption is enabled, you can modify and view the encrypted values and fields.

  • When In-Use Encryption is disabled, Compass displays the values of these fields as a series of asterisks.

If your document contains a URL value, you can right-click the URL and select Open URL in browser to open the URL in your browser:

Right click to Open URL

Back

Manage Documents

On this page