> For the complete documentation index, see [llms.txt](https://docs.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angular-package.dev/sass/map/map.pick.md).

# map.pick()

The `map.pick()` function returns a copy of [`$map`](#usdmap) of [`$keys`](#usdkeys...).

{% code lineNumbers="true" %}

```scss
// Sass.
@use 'sass:list';
@use 'sass:map';

// Functions.
@use 'map.deep-merge.function' as *;
@use 'map.get.function' as *;
@use 'map.set.function' as *;

// Modules.
@use 'pattern';
@use 'pick';

// The `map.pick()` function.
@function pick($map, $keys...) {
  $result: ();
  @each $key in $keys {
    @if type-of($key) == list {
      $result: set(
        $result,
        if(
          list.separator($key) == space,
          ($key),
          if(list.length($key) > 1, list.nth($key, list.length($key)), $key)
        ),
        get($map, $key)
      );
    } @else if pattern.is($key) {
      $result: deep-merge($result, pick.pattern($map, $key...));
    } @else {
      $result: deep-merge(
        $result,
        (
          $key: get($map, $key),
        )
      );
    }
  }
  @return $result;
}
```

{% endcode %}

{% embed url="<https://github.com/angular-package/sass/blob/main/map/_map.pick.function.scss>" %}

### Parameters

#### `$map`

A map from which values of [`$keys`](#usdkeys...) are taken.

#### `$keys...`

List of keys to get the values from [`$map`](#usdmap).

### Return

The return value is a copy of [`$map`](#usdmap) built of [`$keys`](#usdkeys...).

## Examples

```scss
// Use.
@use '@angular-package/sass/map';

// Examples.


```
