getNestedDocument
Retrieves a nested document, converting it to a DynamicDocument if necessary.
If the nested value is already a DynamicDocument, it is returned directly. Otherwise, if it's a MutableMap, it is converted to a SimpleDynamicDocument.
Return
The nested dynamic document.
Parameters
key
The key of the nested document.
Throws
if the key is not present.
if the value cannot be converted to a DynamicDocument.