---
title: "subscript(_:as:)"
framework: corevideo
role: symbol
role_heading: Instance Subscript
path: "corevideo/cvattachmentrawvalue/subscript(_:as:)"
---

# subscript(_:as:)

Get or set value associated with the specified key.

## Declaration

```swift
subscript<Value>(key: String, as type: Value.Type = Value.self) -> Value? where Value : CVAttachmentValueRepresentable { get set }
```
