Working with Document Data
To offer better support for complex nested data, DbVisualizer includes special functionality for document-based databases.
This is currently supported for MongoDB only.
Nested column headers
When working with documents, a regular two-dimensional grid is not always suitable. Instead, the data is presented in a special grid view that uses expandable column header groups based on the structure of the displayed document data.

You can expand/collapse headers to focus on the data you are interested in (either by double-clicking the header or via the header's context menu). When a header group is collapsed, the corresponding data is also collapsed in the grid. Use the Value viewer to see the expanded value.

Filtering
Similarly to normal grids, data in a document grid can be filtered. The quick filter can be used for full text filtering after the data has been fetched from the database.
The where filter is instead included in the underlying database query, and can be used to control which subset of the data is fetched from the database. In the case of MongoDB, the MongoDB Shell syntax is used here.

Document viewer
Instead of the familiar Record viewer, the Document viewer is used for documents. It shows the JSON representation of the underlying document. Depending on the way you want to interact with the data, you can switch between the graphical JSON view and the text view.

Editing
When editing is supported, edits can be made inline in the grid, in the Value tab, or in the Document tab. Changes made in the grid are directly propagated to the other tabs and vice versa. Uncommitted changes are color-marked in the grid.

For collapsed cells, the corresponding compound value is displayed in the Value tab, which typically means that it will be displayed as a JSON object. To be able to edit the value, you will need to switch to the text view. The same goes for the Document tab. To be able to edit the document, switch to the text view.
Add document
To add a document to a collection, use the table editor. If you want to create a document from JSON, if the collection is empty or the document has a different structure than the rest of the collection, use the Add Document action (right-click on the collection node in the database objects tree or use the Actions menu in the Data tab).
Remove document
To remove a document visually, use the table editor. For mass operations or other advanced cases, use scripting.
Edit document
Values can be edited inline in the grid, using the Value tab or the Document tab. Any changes are synced between the different views.
Add column
To add a column to a single document, use the editor in the Document tab. After the grid is reloaded, the new column will become visible in the grid and you will be able to edit it visually for other documents.
Remove column
To remove a column completely from a single document, use the editor in the Document tab. To remove a column from the whole collection, use scripting.
Advanced cases
For scenarios where the table editor and the editor capabilities in the Value tab and the Document tab aren't enough, use SQL Commander to execute scripts instead.
Scripting
As with SQL databases, scripting can be used to fetch data and perform other operations. When fetching data, the result set will be displayed in a table that has the same properties as described above.
In the case of MongoDB, the MongoDB Shell syntax is used.
