---
title: "subscript(_:as:)"
framework: xpc
role: symbol
role_heading: Instance Subscript
path: "xpc/xpcarray/subscript(_:as:)-6vjz"
---

# subscript(_:as:)

Get a value in this array as an XPCArray.

## Declaration

```swift
subscript(index: Int, as type: XPCArray.Type = XPCArray.self) -> XPCArray? { get }
```

## Parameters

- `index`: The index at which to get the XPCArray.
- `type`: The expected type of the resulting value.

## Return Value

Return Value An XPCArray value or nil if no such value was found.
