_MapValueByKey

Gets a value of given key

Lists.au3
_MapValueByKey( $aMap , $vKey [, $bCaseSensitive = False ]] )

parameters

$aMap Key map array as handle
$vKey Key to search for
$bCaseSensitive True = case sensitive for strings, False = case insensitive

return value

value Value belonging to key

@error

1 Not a key map
2 Key map is empty, no values
3 Key not found

related

_MapAdd, _MapKeyByValue, _MapRemoveByKey, _MapRemoveByValue, _MapGetKey, _MapGetValue, _MapKeyInMap, _MapValueInMap

example

Local $aAddress = _MapCreate()
_MapAdd( $aAddress, "street", "Scary avenue" )
_MapAdd( $aAddress, "town", "Ghost town" )
_MapAdd( $aAddress, "state", "Night state" )
....
If _MapKeyInMap( $aAddress, "street" ) > -1 Then _ConsoleWrite( _MapValueByKey( $aAddress, "street" ) ) ; Scary avenue