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 (New in Compass 1.20)JSON视图(Compass 1.20中新增
Documents are shown as properly-formatted JSON objects.文档显示为格式正确的JSON对象。In this view Compass uses extended JSON to display the data types of fields where appropriate.在这个视图中,Compass使用扩展JSON在适当的地方显示字段的数据类型。
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 you would like to use:使用“视图”按钮选择要使用的视图:

View Selection Highlight

Documents list view
click to enlarge
Note

JSON View is available starting in Compass 1.20.JSON视图从Compass 1.20开始提供。

Documents in JSON view
click to enlarge
Documents in Table 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.对列进行重新排序是一种表面上的改变,不会改变基础数据本身。

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

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
Documents in Table 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.对列进行重新排序是一种表面上的改变,不会改变基础数据本身。

To copy a document to your clipboard, hover over the document and click the Copy icon:要将文档复制到剪贴板,请将鼠标悬停在文档上,然后单击复制图标:

Copy Document from List View
click to enlarge

To copy a document to your clipboard, hover over the document and click the Copy icon:要将文档复制到剪贴板,请将鼠标悬停在文档上,然后单击复制图标:

Copy Document from JSON View
click to enlarge

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.要查看嵌套的对象ObjectArray元素,请将光标悬停在值类型为“对象”或“数组”的字段上,然后单击该字段右侧显示的带向外箭头的按钮。

Compass opens a new tab in the Table View corresponding to the nested element.Compass在表视图中打开与嵌套元素对应的新选项卡。

View nested elements in Table view
click to enlarge

The following example displays the delays object nested within the flightStats collection documents. 以下示例显示flightStats集合文档中嵌套的delays对象。The new tab displays the two properties of the delay object: arrivalRunwayDelayMinutes and departureRunwayDelayMinutes.新选项卡显示delay对象的两个属性:arrivalRunwayDelayMinutesdepartureRunwayDelayMinutes

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.要返回原始表格显示,请单击表格视图中显示集合名称的第一个选项卡。

Compass obscures document fields encrypted with Field-Level Encryption (FLE). Compass会遮挡使用字段级加密(FLE)加密的文档字段。Compass displays the values of these fields as a series of asterisks. Compass将这些字段的值显示为一系列星号。You cannot modify the value of a field encrypted with FLE.不能修改用FLE加密的字段的值。

Encrypted field in list view
click to enlarge

Compass obscures document fields encrypted with Field-Level Encryption (FLE). Compass会遮挡使用字段级加密(FLE)加密的文档字段。Compass displays the values of these fields as a series of asterisks. Compass将这些字段的值显示为一系列星号。You cannot modify the value of a field encrypted with FLE.不能修改用FLE加密的字段的值。

Compass obscures document fields encrypted with Field-Level Encryption (FLE). Compass会遮挡使用字段级加密(FLE)加密的文档字段。Compass displays the values of these fields as a series of asterisks. Compass将这些字段的值显示为一系列星号。You cannot modify the value of a field encrypted with FLE.不能修改用FLE加密的字段的值。

Encrypted field in table view
click to enlarge