---
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: addAll (anotherMap)
layout: subsection
---

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

Copies all of the key-value mappings from anotherMap to the map. It replaces existing key-value mappings in the map.

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

`Map`

## <a id="section_dz5_pwg_5db"></a>Instance Method Syntax

```
thisMap.addAll(anotherMap)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>anotherMap</td><td>The map to copy.</td></tr></tbody></table><br/>

<b>Example</b>

`{'foo': 1}.addAll({'bar': 2, 'baz': 3})`

Returns `{'bar':2, 'foo':1, 'baz':3}`

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

```
map:addAll(map, anotherMap)
```

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

