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

# subscript(_:as:)

Get or set attachment value associated with a string key

## Declaration

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