<!--
{
  "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_dictionary_get_array(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@F@xpc_dictionary_get_array"
  },
  "title" : "xpc_dictionary_get_array(_:_:)"
}
-->

# xpc_dictionary_get_array(_:_:)

Returns the array value for the specified key.

```
func xpc_dictionary_get_array(_ xdict: xpc_object_t, _ key: UnsafePointer<CChar>) -> xpc_object_t?
```

## Parameters

`xdict`

The dictionary object which is to be examined.

`key`

The key whose value is to be obtained.

## Return Value

The object for the specified key within the dictionary. `NULL` if there is no value associated with the specified key, if the given object was not an XPC dictionary, or if the object for the specified key is not an array.

## Discussion

This method does not grant the caller a reference to the underlying object, so the caller is not responsible for releasing the object.

---

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)