[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [getHead](./js-utils.gethead.md) ## getHead() function Get the first element from the specified key within a map of lists. Signature: ```typescript export declare function getHead(map: Map>, key: TKey): TVal; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | map | Map<TKey, ReadonlyArray<TVal>> | | | key | TKey | | Returns: TVal