# How to add Javascript Maps to state in Nakama Authoritative Server?

**URL:** <https://forum.heroiclabs.com/t/how-to-add-javascript-maps-to-state-in-nakama-authoritative-server/3346>\
**Category:** Runtime Framework\
**Tags:** server-framework, typescript\
**Created:** [December 16, 2022, 5:16am UTC](https://forum.heroiclabs.com/t/how-to-add-javascript-maps-to-state-in-nakama-authoritative-server/3346 "2022-12-16T05:16:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quitalizner](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@quitalizner](https://forum.heroiclabs.com/u/quitalizner)\
**Post date:** [December 16, 2022, 5:16am UTC](https://forum.heroiclabs.com/t/how-to-add-javascript-maps-to-state-in-nakama-authoritative-server/3346/1 "2022-12-16T05:16:15Z")

</div>

I’m trying to have a few Map objects in the state handled by nakama runtime.

within matchInit

```auto
	const state: INormalGameState = {
		label,
		emptyTicks: 0,
		presences: {},
		joinsInProgress: 0,
		playing: false,
		players: new Map<string, IPlayerState>(),
		inputQueues: new Map<string, IMoveInputData[]>(),
		coins: new Map<string, ICoinState>(),
		nextCoinGenIndex: 0,
	};

```

When I try to call map methods such as set, delete in any of the other match methods I’m getting Object has no member ‘set’ | ‘delete’  
I guess Nakama is converting the data.

Is there a workaround for this. Is my approach right?  
Please suggest
