---
title: "subscript(_:as:default:)"
framework: xpc
role: symbol
role_heading: Instance Subscript
path: "xpc/xpcdictionary/subscript(_:as:default:)-17z80"
---

# subscript(_:as:default:)

Get a value in this dictionary as an XPCArray.

## Declaration

```swift
subscript(key: String, as type: XPCArray.Type = XPCArray.self, default defaultValue: @autoclosure () -> XPCArray) -> XPCArray { get }
```

## Parameters

- `key`: The key under which to get the XPCArray.
- `type`: The expected type of the resulting value.
- `defaultValue`: The value to produce if no XPCArray is available under key.

## Return Value

Return Value An XPCArray value, possibly defaultValue.
