<!--
{
  "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/XPCDictionary/subscript(_:as:)-1nvet",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC13XPCDictionaryV_2ass7RawSpanVSgSS_AFmtcip"
  },
  "title" : "subscript(_:as:)"
}
-->

# subscript(_:as:)

Get a value in this dictionary as data.

```
subscript(key: String, as type: RawSpan.Type = RawSpan.self) -> RawSpan? { get }
```

## Parameters

`key`

The key under which to get the data.

`type`

The expected type of the resulting value.

## Return Value

A RawSpan containing the data or `nil` if no such value was found.

---

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)