# Creating a Map of type damlTypes.Map\<string, damlTypes.Party\>

**URL:** https://forum.canton.network/t/creating-a-map-of-type-damltypes-map-string-damltypes-party/6898
**Category:** App Development
**Tags:** ledger-api, react
**Created:** [October 25, 2023, 9:30am UTC](https://forum.canton.network/t/creating-a-map-of-type-damltypes-map-string-damltypes-party/6898 "2023-10-25T09:30:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Joao\_Freitas](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/joao_freitas/32/3352_2.png) [@Joao\_Freitas](https://forum.canton.network/u/Joao_Freitas)
#### Post date: [October 25, 2023, 9:30am UTC](https://forum.canton.network/t/creating-a-map-of-type-damltypes-map-string-damltypes-party/6898/1 "2023-10-25T09:30:46Z")

</div>

Hi everyone 🙂

on my project i am trying to create a Map of the following type damlTypes.Map\<string, damlTypes.Party\> (imported from the @daml/types lib).

But it keeps throwing me an error pointing that the " Property ‘entriesArray’ is missing"

I am doing it this way:

```haskell
const myMap: damlTypes.Map<string, damlTypes.Party> = new Map(),
myMap.set("","");

```

any help would be appreciated on how to create MapImpl ([MapImpl |](https://docs.daml.com/1.8.0-snapshot.20201201.5776.0.4b91f2a6/app-dev/bindings-ts/daml-types/classes/_index_.mapimpl.html)) on the FE.

Thanks 🙂

---

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)
#### Post date: [October 25, 2023, 2:28pm UTC](https://forum.canton.network/t/creating-a-map-of-type-damltypes-map-string-damltypes-party/6898/2 "2023-10-25T14:28:16Z")

</div>

```haskell
const myMap: damlTypes.Map<string, damlTypes.Party> = new Map(),

```

In this line of code, `Map` is [a totally unrelated type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) to `damlTypes.Map`. That error takes the form of pointing out that your property sets don’t match up correctly, as `damlTypes.Map` is a purely structural type.

`MapImpl` is not exported. [In the public exports of `@daml/types` you’ll find the emptyMap function](https://docs.daml.com/app-dev/bindings-ts/daml-types/modules.html#emptyMap); this is a good starting point.

---

<div class="post-metadata">

### Author: ![Joao\_Freitas](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/joao_freitas/32/3352_2.png) [@Joao\_Freitas](https://forum.canton.network/u/Joao_Freitas)
#### Post date: [October 25, 2023, 2:47pm UTC](https://forum.canton.network/t/creating-a-map-of-type-damltypes-map-string-damltypes-party/6898/3 "2023-10-25T14:47:15Z")

</div>

Thank Stephen, yes on the meanwhile i opened the daml/types lib and found that.

```haskell
 const empty = damlTypes.emptyMap<string, damlTypes.Party>()

```

solved my problem and then added the needed info with the .set() method.

Thanks 🙂
