---
title: "field(_:as:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdlayer/spec/fieldcollection/field(_:as:)"
---

# field(_:as:)

Typed field accessor.

## Declaration

```swift
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

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