---
title: "subscript(_:as:default:)"
framework: xpc
role: symbol
role_heading: Instance Subscript
path: "xpc/xpcarray/subscript(_:as:default:)-4ey7n"
---

# subscript(_:as:default:)

Get a value in this array as a UUID.

## Declaration

```swift
subscript(index: Int, as type: uuid_t.Type = uuid_t.self, default defaultValue: @autoclosure () -> uuid_t) -> uuid_t { get }
```

## Parameters

- `index`: The index at which to get the UUID.
- `type`: The expected type of the resulting value.
- `defaultValue`: The value to produce if no UUID is available at index.

## Return Value

Return Value A UUID value, possibly defaultValue.
