ditto / live.ditto / DittoMutableDocumentPath / get

get

operator fun get(key: String): DittoMutableDocumentPath

Used to specify a path to a key in the document that you can subscript further to access a nested key in the document and eventually perform an update operation on.

Parameters

key - the next part of the path needed to get to the key in the document you wish to update.

Return
a DittoMutableDocumentPath with the provided key incorporated into the path.

operator fun get(index: Int): DittoMutableDocumentPath

Used to specify an index in the array at the preceding key-path specified through the subscripting defined previously. You can subscript the return value further to access a further nested key in the document and eventually perform an update operation.

Parameters

index - the index of the array that you wish to access in the key previously specified with the preceding subscripting.

Return
a DittoMutableDocumentPath with the provided index incorporated into the path.