get¶
Gets the item for the given key from a map< K, V > or given index from a list< T > or nested value from an optional value.
Parameters:
No. | Type | Comments |
---|---|---|
1 | map< K, V > or list< T > or T ? or try< T > | The target map, list, try or optional value |
2 | Value of type K or int |
Key or index to be used to read the map or list. Not specified if 1st arg is an optional or try value |
Returns: Optional map value or list element
Usages:
get( v:map<K, V>, key:K ) : V ?
get( v:list<T>, index:int ) : T ?
get( v: T ?) : T