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

# xpc_array_get_dictionary(_:_:)

Returns the dictionary at the specified index in the array.

```
func xpc_array_get_dictionary(_ xarray: xpc_object_t, _ index: Int) -> xpc_object_t?
```

## Parameters

`xarray`

The array object which is to be examined.

`index`

The index of the value to obtain. This value must lie within the range of indexes as specified in [`xpc_array_set_value(_:_:_:)`](/documentation/XPC/xpc_array_set_value(_:_:_:)).

## Return Value

The object at the specified index within the array or `NULL` if the given object was not an XPC array or if the the value at the specified index was not a dictionary.

## Discussion

---

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)