I use Immutable.js to deserialize stored maps. Unfortunately I have not yet managed to access properties of the map. If I run the code like below, I get the right map entry. If I try to access the property name, I get an undefined object. I'm new to JS and haven't quite figured out how to access the entries yet.
I get this object back if I run the following code. How can I access the name now?
let map: Immutable.Map<string, User> = Immutable.fromJS(users[index].userMap).toMap();
console.log(map.get("4");
Map {size: 2, _root: ArrayMapNode, __ownerID: undefined, __hash: undefined, __altered: false}
size: 2
_root: ArrayMapNode
ownerID: OwnerID {}
entries: Array(6)
0: (2) ["name", "joe"]
1: (2) ["text", "test"]
length: 2
__proto__: Array(0)
__proto__: Object
__ownerID: undefined
__hash: undefined
__altered: false
state: true
__proto__: KeyedCollection
User
export interface User {
name: string;
text: string;
}
userMap: Immutable.Map<string, User>;