nested dictionaries

bonesash's icon

Hi guys,
if I have a dictionary as a value of a key, how do i insert/change a key affecting the mother-dictionary, too. for example:

var dict = new Dict ("example");
dict.set ("key1", new Dict);
dict = dict.get ("key1");
dict.set ("key1", "value");

The the dictionary "key1" in the dictionary "example" remains empty. why??? ( I know it would be possible if I would have filled the second dict first and added it afterwards, but it must be possible this way!). A solution would be awesome! Thanks

amounra's icon

Even thought I'm not sure what you're after here, I think you would need to at least do this:

dict.set ("key1", new Dict());