# selection.Selection.map

- **Module:** selection.Selection
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/selection.ts#L388
- **Page:** https://libtmux.org/reference/ts/selection-selection-map/

```
selection.Selection.map(transform: : (value: Model, index: number, values: readonly Model[]) => Result, thisArg: : unknown) -> Result[]
```

Apply `transform` to each member, in order.

Returns an array rather than a Selection: the results are no longer tmux
objects, so they carry no identity to filter, count, or traverse from.

## Example

```ts
snapshot.windows.map((entry) => entry.name); // string[]
```
