---
title: "subscript(_:)"
framework: network
role: symbol
role_heading: Instance Subscript
path: "network/nwtxtrecord/subscript(_:)"
---

# subscript(_:)

Get and set values in a TXT record dictionary, by keys.

## Declaration

```swift
subscript(key: String) -> String? { get set }
```

## See Also

### Examining TXT Records

- [getEntry(for:)](network/nwtxtrecord/getentry(for:).md)
- [dictionary](network/nwtxtrecord/dictionary.md)
