I have a nested Immutable.Map of Immutable.Map type defined as follows:
export type Data = Immutable.Map<string, Immutable.Map<string, string>>;
const nested : Data = Immutable.Map();
Data in the nested should look like this:
{
'a': {
'a1': 'value1',
'a2': 'value2',
},
'b': {
'b1': 'value1',
'b2': 'value2',
},
...
}
How should I insert/update a value for the nested variable (assume I have input like {'a', 'a1', 'value1'})? I know I can do checks and create the second immutable map if it's null, but is there an easier way to do that?