<!--
{
  "availability" : [
    "iOS: 18.5.0 -",
    "iPadOS: 18.5.0 -",
    "macCatalyst: -",
    "macOS: 15.5.0 -",
    "tvOS: 18.5.0 -",
    "visionOS: 2.5.0 -",
    "watchOS: 11.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPCDictionary/subscript(_:as:)-58a41",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC13XPCDictionaryV_2asAA8XPCArrayVSgSS_AFmtcip"
  },
  "title" : "subscript(_:as:)"
}
-->

# subscript(_:as:)

Get a value in this dictionary as an XPCArray.

```
subscript(key: String, as type: XPCArray.Type = XPCArray.self) -> XPCArray? { get }
```

## Parameters

`key`

The key under which to get the XPCArray.

`type`

The expected type of the resulting value.

## Return Value

An XPCArray value or `nil` if no such value was found.

---

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)