AdamTypeException if the value is not an ARRAY;
AdamIndexException if index is out of range.
adam opIndex(size_t index) ref @safeAccess an array element by index, returning a mutable reference.
AdamTypeException if the value is not an ARRAY;
AdamIndexException if index is out of range.
const(adam) opIndex(size_t index) ref const @safeConst array element access by index.
AdamTypeException if the value is not an ARRAY;
AdamIndexException if index is out of range.
adam opIndex(string key) ref @safeAccess a map entry by key, returning a mutable reference.
Autovivification: this is an inserting accessor. Reading a missing key inserts adam.init (NULL) under it, and a NULL this is promoted to an empty OBJECT. This enables chained deep access like root["a"]["b"]["c"] = 1;, but it also means any read of a misspelled key silently creates that entry and returns NULL. For lookup without insertion use contains, get, or the const overloads (which throw AdamKeyException on missing keys instead).
const(adam) opIndex(string key) ref const @safeConst member lookup by key (never inserts).
AdamTypeException if the value is not an OBJECT;
AdamKeyException if key is not present.