---
id: reflect-field
name: Reflect.field
category: reflect
kind: namespace-method
tokens: Reflect.field
sig: Reflect.field(prop, name) -> int
tip: The field id of a named field within a property, or -1.
order: 2
ns: Reflect
member: field
---
Resolves a field name within property prop to its field id (index), or -1 if the property has no such field. Pair it with Reflect.get/Reflect.set to read or write that field.
Parameters:
- `prop` — a property id (from Reflect.prop)
- `name` — the field name
```ludic
program Demo {
property Health { hp: int = 0, max: int = 0 }
model Unit { Health }
entry {
let H = Reflect.prop("Health")
let mx = Reflect.field(H, "max")
print(mx)
}
}
```