<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/OSDictionary/getObject-9ikoz",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@OSDictionary@F@getObject#*1$@S@OSObject#1"
  },
  "title" : "getObject"
}
-->

# getObject

Returns a member of the dictionary.

```
OSObject * getObject(const OSObject *aKey) const;
```

## Parameters

`aKey`

An object pointer used to lookup the object. The key should be uniqued within the dictionary. Usually an OSString is passed as the key.

## Return Value

Member at the given index or NULL if the index is greater or equal to the array count. The retain count of the result object is not incremented and the object should not be release by the caller.

## Discussion

Looks up an existing object in the dictionary with the given key and returns it.

---

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)