I'm new to javascript and i want to complete a task using immutable js. I have a map like this:
const clients = Map({
"c1": {
"id": "c1",
"isLegalEntity": false,
"wantsEstatements": true,
"portfolios": {
"a": {
"id": "a",
"type": "Cash"
},
"b": {
"id": "b",
"type": "Margin"
}
}
},
"c2": {
"id": "c2",
"isLegalEntity": false,
"wantsEstatements": true,
"portfolios": {
"e": {
"id": "e",
"type": "Cash"
},
"f": {
"id": "f",
"type": "Margin"
}
}
}
})
I want to create three tables. The first table will contain the "c1" and "c2" values so from the documentation i've read i use the clients.keys() property. The other table must contain all the portfolios id like this: ["e", "f"] and the last table must contain all the portfolios types like this: ["cash", "margin"] but i don't know how to do this from the documentation. Do you know how?