Sample code for 30+ languages & platforms
AutoIt

JSON Append String Array

See more JSON Examples

Demonstrates how to append an array of strings from a string table object.

Note: This example uses the AppendStringTable method, which was introduced in Chilkat v9.5.0.67

Chilkat AutoIt Downloads

AutoIt
$oJson = ObjCreate("Chilkat.JsonObject")
$oJson.EmitCompact = False

$oJson.AppendString("abc","123")

$oSt = ObjCreate("Chilkat.StringTable")
$oSt.Append("a")
$oSt.Append("b")
$oSt.Append("c")
$oSt.Append("d")

$oJson.AppendStringArray("strArray",$oSt)

ConsoleWrite($oJson.Emit() & @CRLF)

;  Output:

;  	{
;  	  "abc": "123",
;  	  "strArray": [
;  	    "a",
;  	    "b",
;  	    "c",
;  	    "d"
;  	  ]
;  	}