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

# subscript(_:as:)

Get a value in this array as data.

## Declaration

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

## Parameters

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

## Return Value

Return Value An array containing the data or nil if no such value was found.
