Dim m1 As Map
m1.Initialize
m1.Put("email", "some_email@bestmail.com")
m1.Put("deviceid", "4444444")
Dim m2 As Map
m2.Initialize
m2.Put("id", "AST")
m2.Put("name", "Australia")
m2.Put("id", "EQD")
m2.Put("name", "Equador")
m2.Put("id", "MEX")
m2.Put("name", "Mexico")
Dim Data As List
Data.Initialize
Data.Add(1)
Data.Add(3)
Data.Add(m1)
'or...not working...only shows last map entry: id:MEX, name:Mexico
Data.Add(m2)
'this doesn't work either
Data.Add(m2.GetKeyAt(0))
Data.Add(m2.GetValueAt(0))
'generate JSON
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize2(Data)
Dim target_json As String
target_json = "'[1,3,{email:some_email@bestmail.com,deviceid:1234567},{id:AST,name:Australia},{id:EQD,name:Equador},{id:MEX,name:Mexico}]'"
Msgbox("target_json: " & target_json ,"")
Msgbox("JSONGenerator: " & JSONGenerator.ToString,"")
Msgbox("stop","")
ExecuteRemoteQuery2(JSONGenerator.ToString, JSON_INSERT)