Warning: This feature is experimental. It may not work, may contain bugs or may be changed or removed without notice.
DO NOT REPORT BUGS OR REQUEST NEW FEATURES FOR THIS FEATURE.

# Function Reference

# MapExists

Determine whether a key exists within a Map.

MapExists ( map, key )

## Parameters

map | An existing Map
key | The key to check

## Return Value

Success: | True
Failure: | False and sets the @error flag to non-zero

## Related

IsMap

## Example

    #include <MsgBoxConstants.au3>

    Example()

    Func Example()
        ; Declare a map and assign with various keys value pairs.
        Local $mMap[]
        $mMap["Jasper"] = "Jasper value"
        $mMap["Beethoven"] = "Beethoven value"
        $mMap["Pinky"] = "Pinky value"

        ; Display whether the key exists or not.
        MsgBox($MB_SYSTEMMODAL, "", "Jasper: " & MapExists($mMap, "Jasper")) ; Returns 1.
        MsgBox($MB_SYSTEMMODAL, "", "Fidget: " & MapExists($mMap, "Fidget")) ; Returns 0.

        ; Clear a key by setting it to Null. The key will still exist in the map. Use MapRemove to remove the key entirely.
        $mMap["Jasper"] = Null

        MsgBox($MB_SYSTEMMODAL, "", "Jasper: " & MapExists($mMap, "Jasper")) ; Returns 1.
    EndFunc   ;==>Example