<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPCArray/subscript(_:as:default:)-4ey7n",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC8XPCArrayV_2as7defaults5UInt8V_A15GtSi_AG_A15GtmAG_A15GtyXKtcip"
  },
  "title" : "subscript(_:as:default:)"
}
-->

# subscript(_:as:default:)

Get a value in this array as a UUID.

```
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

A UUID value, possibly `defaultValue`.

---

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)