---
title: getObject
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osdictionary/getobject-9ikoz
---

# getObject

Returns a member of the dictionary.

## Declaration

```occ
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

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

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

## See Also

### Accessing Keys and Values

- [getObject](driverkit/osdictionary/getobject-8k3ie.md)
- [setObject](driverkit/osdictionary/setobject-9b4z0.md)
- [setObject](driverkit/osdictionary/setobject-7q0u2.md)
- [removeObject](driverkit/osdictionary/removeobject-25qm5.md)
- [removeObject](driverkit/osdictionary/removeobject-156jh.md)
- [iterateObjects](driverkit/osdictionary/iterateobjects-9h89s.md)
- [iterateObjects](driverkit/osdictionary/iterateobjects-6cv0d.md)
- [OSDictionaryIterateObjectsBlock](driverkit/osdictionaryiterateobjectsblock.md)
- [OSDictionaryIterateObjectsCallback](driverkit/osdictionaryiterateobjectscallback.md)
