# getVariantValueByKey

> **getVariantValueByKey**\<`T`, `K`\>(`variant`, `key`): [`CandidVariantValue`](../type-aliases/CandidVariantValue.md)\<`T`, `K`\>

Defined in: [utils/candid.ts:95](https://github.com/B3Pay/ic-reactor/blob/452866bcf5c5994de1f73416e6a3b2d18e4188fa/packages/core/src/utils/candid.ts#L95)

## Type Parameters

### T

`T` *extends* `Record`\<`string`, `any`\>

### K

`K` *extends* `string`

## Parameters

### variant

`T`

### key

`K`

## Returns

[`CandidVariantValue`](../type-aliases/CandidVariantValue.md)\<`T`, `K`\>