Visual Basic 6.0
Visual Basic 6.0
JSON AppendArray2 Example
Demonstrates the AppendArray2 function.Chilkat Visual Basic 6.0 Downloads
Dim json As New ChilkatJsonObject
success = json.Load("{ ""name"": ""John"", ""marbles"": 100 }")
' Append an empty array named "xyz"
Dim jarr As New ChilkatJsonArray
success = json.AppendArray2("xyz",jarr)
Debug.Print json.Emit()
' Expected output is: {"name":"John","marbles":100,"xyz":[]}
' Add elements to the array.
success = jarr.AddStringAt(-1,"hello")
success = jarr.AddIntAt(-1,256)
Debug.Print json.Emit()
' Expected output is: {"name":"John","marbles":100,"xyz":["hello",256]}