Skip to main content
Version: 1.16.1

Function: extractRecordField()

extractRecordField(record: Record<string, unknown>, fieldName: string): Record<string, unknown> | undefined

Defined in: canton/events.ts:478

Extract a named field from a decoded Daml record and, if it is itself a record, flatten it into a label → value map. Returns undefined when the field is absent. Use for nested fields like instrumentId (a { admin, id } record inside a TokenConfig create argument).

Parameters​

ParameterType
recordRecord<string, unknown>
fieldNamestring

Returns​

Record<string, unknown> | undefined