Dim t As String = $"
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
"$
Dim JsonMap As Map = t.As(JSON).ToMap.Get("menu").As(Map) 'ignore
JsonMap.Remove("popup")
Dim menuitem As List = t.As(JSON).ToMap.Get("menu").As(Map).Get("popup").As(Map).Get("menuitem").As(List) 'ignore
menuitem.Add(CreateMap("value": "Delete", "onclick": "DeleteDoc()"))
Dim popup As Map = CreateMap("menuitem" : menuitem)
JsonMap.Put("popup", popup)
JsonMap = CreateMap("menu": JsonMap)
Dim s As String = JsonMap.As(JSON).ToString
Log(s)