ObjectCollection.Item Method (console safe)
Use this setter/getter function to get or set element by a string key.

Item(
key
as String)
as Object

Item(
key
as String
assigns value
as Object)
Parameters
- key
- The string key for the element to get or set.
- value (assignment parameter)
- When using the setter then this is the object to assign to the collection.
Returns
- Object
- When using the getter then the requested object is returned, or nil if it was not found.
Remarks
If the Collection is in multikey mode then only the first element with the specified key will be retrieved or set by this property.
A error code -2 will be when reading if there was no such key existed.
This error code can help you determine if the nil returned was a actually nil object or if the key did not exist.
See Also
ObjectCollection Class