Tinderbox v9 Icon


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Dictionary, Set & List operations   [other Dictionary, Set & List operations operators]




returns the Dictionary's value for the submitted key string. For example:

$MyDictionary=dictionary("cat:animal; dog:animal; rock: mineral"); 

$MyString = $MyDictionary["dog"]; 

sets MyString to the string "animal".

It is not required to use quotes around key.

The key may also be a (loop) variable, or an attribute value. The latter are evaluated before use:

$MyList.each(anItem){$MyString = $MyString + ", " + $MyDictionary[anItem];} 

$MyString = $MyDictionary[$SomeAttribute];} 

This has the same effect as .at( ), but may be more convenient. Note that in both the square-bracket syntax and .at() syntax a numerical key value is interpreted as a key and not a list item number, unlike List/Set.at().