<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/AIModelAsset/Metadata-swift.struct/subscript(_:_:)-44ov4",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Core AI"
    ],
    "preciseIdentifier" : "s:11CoreAIAsset12AIModelAssetV8MetadataVySSSgSS_SSmtcip"
  },
  "title" : "subscript(_:_:)"
}
-->

# subscript(_:_:)

Accesses a custom metadata string value for the specified key.

```
subscript(key: String, type: String.Type = String.self) -> String? { get set }
```

---

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)