Navigation

Insert Documents

Click the Insert Document button to insert a new document:

../../_images/insert-button.png

The insert dialog appears:

../../_images/insert-document.png

For each field in the document, select field type and fill in the field name and value.

../../_images/insert-document2.png

Tip

For the field values, you can paste valid JSON that can be parsed by JavaScript’s JSON.parse.

  • If the pasted JSON is an Array, the first character must be a left bracket [ and the last character must be a right bracket ]:

    [ "first", "second", 3 ]
    
  • If the pasted JSON is an Object (i.e. a document), the keys must be quoted in double quotes and are permitted to be escaped. The first character must be left curly brace { and the last must be right curly brace }:

    {
      "email": "test@example.com",
      "phone": "555-555-1212"
    }
    

Add New Fields

To add a new field for the document, hover over the row number in the dialog (the row number is not part of the document but the dialog display) and click on the plus sign add a new field after the field.

../../_images/insert-document-new-field.svg

You can also add a new field at the end by clicking the Tab from the value of the last field.

Tip

To add a new field after an array or a document field, hover over the row number in the dialog (the row number is not part of the document but the dialog display) and click on the plus sign add a new field after the field.

Change Field Type

You can change the data type of a field by using the data type selectors on the right of the field.

../../_images/insert-document3.png

To change the _id field to use a custom value, change the data type from ObjectID to string and then overwrite the _id value:

../../_images/insert-document4.png