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

# subscript(_:as:default:)

Get a value in this dictionary as a UUID.

## Declaration

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

## Parameters

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

## Return Value

Return Value A UUID value, possibly defaultValue.
