Inserts or updates a value in an Automerge map or list. The function automatically dispatches to the appropriate operation based on the object type and key/position type.
Arguments
- doc
An Automerge document
- obj
An Automerge object ID (from nested object), or
AM_ROOTfor the document root- key
For maps: character string key. For lists: numeric index (1-based) or
"end"to append- value
The value to store. Supported types:
NULL- stores nullLogical - stores boolean (must be scalar)
Integer - stores integer (must be scalar)
Numeric - stores double (must be scalar)
Character - stores string (must be scalar)
Raw - stores bytes
AM_OBJ_TYPE_LIST/MAP/TEXT- creates nested object