<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDLayer/Spec/FieldCollection/field(_:as:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDLayerV4SpecV15FieldCollectionPAAE5field_2asqd__SgAA8USDTokenV_qd__mtAA16USDValueProtocolRd__lF"
  },
  "title" : "field(_:as:)"
}
-->

# field(_:as:)

Typed field accessor.

```
func field<T>(_ name: USDToken, as type: T.Type) -> T? where T : USDValueProtocol
```

## Parameters

`name`

The field name to look up.

`type`

The expected value type.

## Return Value

The field’s value as `T`, or `nil` if the field is
unauthored or holds a different type.

---

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)