---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: getValuesFromKeys (map, keys)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Returns all values that match a list of keys in a given map of key/value pairs. If the given map is null, `getValuesFromKeys` returns an empty list. `getValuesFromKeys` returns only the values whose keys match the given keys. If a given key doesn't match anything in the map, `getValuesFromKeys` ignores it.

## <a id="section_cyq_j1m_zsb"></a>Return Type

`List`

## <a id="section_dz5_pwg_5db"></a>Namespace Function Syntax

```
map:getValuesFromKeys(map, keys)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>map</td><td>The input Map.</td></tr><tr><td>keys</td><td>A list of keys</td></tr></tbody></table><br/>

<b>Example</b>

Assume:

-   <i>theMap</i> is <i>{{"key0": "value0"}, {"key1": "value1"}, {"key2", "value2"}}</i>.
-   <i>keyList</i> is <i>['key0', 'key2']</i>.


`map:getValuesFromKeys(theMap, keyList)`

Returns `['value0', 'value2']`

