Application icon

The Container Viewer

The Container Viewer displays a container in a tree view which allows you to expand and view particular portions of a its contents.

The Container Viewer is opened by the Debug statement or the Display Container in Container Viewer statement.

Information on containers can be found in the Containers documentation.

Three columns are displayed. Data Type displays the type of data displayed on a row. Name / Index displays the name associated with an Object item or the index of an Array item. Value displays the value of an item or the number of items contained in an Array or Object item.

Additional functionality can be found on the context menu. If you are running macOS 10.13 or greater, you can create keyboard shortcuts for the menu items in Settings - Menu Shortcuts. The menu has the following items:

Expand
All items under the clicked item are expanded.

Collapse
All items under the clicked item are collapsed.

Expand All
All items are expanded.

Collapse All
All items are collapsed.

Copy Name / Index
The text displayed in the Name / Index column of the clicked item is copied to the system clipboard.

Copy Value
The text displayed in the Value column of the clicked item is copied to the system clipboard. The keyboard shortcut associated with Edit>Copy (typically Command+C) will perform the same function. While you may assign a keyboard shortcut to the function it can also be activated by the shortcut associated with Edit>Copy (typically Command+C).

Copy Directed Path
This function will copy the directed path associated with the clicked item to the system keyboard. Directed paths are used with all the container statements to target an item in the container. The keyboard shortcuts associated with Edit>Cut (typically Command+X) will perform the same function. While you may assign a keyboard shortcut to the function it can also be activated by the shortcut associated with Edit>Cut (typically Command+X).

View Value
The text displayed in the Value column of the clicked item is displayed in a multi line panel. The directed path of the clicked item is displayed as well. Double clicking on an item has the same effect.

Highlight Parent
The parent of the clicked item is highlighted.

Show in Log Viewer
The JSON text representation of the container is displayed in the Log Viewer.

Expand All When Opening
When the Container Viewer opens only the container itself is expanded. When this option is set, all items will be expanded.

You can save the content to a file as JSON or a plist file via File>Save or File>Save As. When saving as JSON you can optionally compress the data. When saving as a plist file you can choose Property List (XML) or Property List (Binary). When saving as JSON, Date and Data items are converted to a description of their value/contents. When saving as a plist file, NULL items are converted to empty Strings.

The search bar looks for matching case insensitive text in the Name/Index and Value columns of each item. The keyboard shortcuts on the Edit>Find menu associated with Find, Find Next and Find Previous can be used.