---
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: getKeys (map)
layout: subsection
---

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

Returns a list of all keys from a given map of key/value pairs. If the given map is null, `getKeys` returns an empty list.

Alternatively, you can use the [keys ( )](/wcp_docs/yig1648434013350.html) function, which returns a set that contains the map keys. If you need to use a list, you can convert the returned set to a list. Example: `[].addAll(map.keys())`

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

`List`

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

```
map:getKeys(map)
```

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

<b>Example</b>

Assume <i>theMap</i> is <i>{{"key0", "value0"}, {"key1", "value1"}}</i>.

`map:getKeys(theMap)`

Returns `['key0', 'key1']`

