<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMapMember(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@F@NSMapMember"
  },
  "title" : "NSMapMember(_:_:_:_:)"
}
-->

# NSMapMember(_:_:_:_:)

Indicates whether a given table contains a given key.

```
func NSMapMember(_ table: NSMapTable<AnyObject, AnyObject>, _ key: UnsafeRawPointer, _ originalKey: UnsafeMutablePointer<UnsafeMutableRawPointer?>?, _ value: UnsafeMutablePointer<UnsafeMutableRawPointer?>?) -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if `table` contains a key equal to `key`, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

If `table` contains a key equal to `key`, `originalKey` is set to `key`, and `value` is set to the value that `table` maps to `key`.

## See Also

[`NSNextMapEnumeratorPair`](/documentation/Foundation/NSNextMapEnumeratorPair(_:_:_:))

Returns a Boolean value that indicates whether the next map-table pair in the enumeration are set.

[`NSAllMapTableValues`](/documentation/Foundation/NSAllMapTableValues(_:))

Returns all of the values in the specified table.

[`NSMapGet`](/documentation/Foundation/NSMapGet(_:_:))

Returns a map table value for the specified key.

[`NSEnumerateMapTable`](/documentation/Foundation/NSEnumerateMapTable(_:))

Creates an enumerator for the specified map table.

[`NSAllMapTableKeys`](/documentation/Foundation/NSAllMapTableKeys(_:))

Returns all of the keys in the specified map table.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)