---
title: "subscript(dynamicMember:)"
framework: foundation
role: symbol
role_heading: Instance Subscript
path: "foundation/scopedattributecontainer/subscript(dynamicmember:)"
---

# subscript(dynamicMember:)

Returns the value of the attribute that the specified key path indicates.

## Declaration

```swift
@preconcurrency subscript<T>(dynamicMember keyPath: KeyPath<S, T>) -> T.Value? where T : AttributedStringKey, T.Value : Sendable { get set }
```
