<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/SessionPropertyValues/subscript(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels21SessionPropertyValuesCy5ValueQzxmcAA0cD3KeyRzluip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Accesses the value stored for the given session property key.

```
final subscript<K>(key: K.Type) -> K.Value where K : SessionPropertyKey { get set }
```

## Parameters

`key`

The session property key type whose value to read or write.

---

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)