Sample code for 30+ languages & platforms
AutoIt Requires Chilkat v11.4.0+

Example: JsonObject.NewArrayOf method

See more JSON Examples

Demonstrates the NewArrayOf method.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

Local $sBig_cats = "[""lion"",""tiger"",""leopard"",""jaguar"",""cheetah"",""snow leopard"",""clouded leopard"",""cougar"",""puma"",""panther""]"

$oJson = ObjCreate("Chilkat.JsonObject")

$oJson.UpdateString("test","abc")

$bSuccess = $oJson.NewArrayOf("big_cats",$sBig_cats)
If ($bSuccess = False) Then
    ConsoleWrite($oJson.LastErrorText & @CRLF)
    Exit
EndIf

$oJson.EmitCompact = False
ConsoleWrite($oJson.Emit() & @CRLF)

;  Result:

;  {
;    "test": "abc",
;    "big_cats": [
;      "lion",
;      "tiger",
;      "leopard",
;      "jaguar",
;      "cheetah",
;      "snow leopard",
;      "clouded leopard",
;      "cougar",
;      "puma",
;      "panther"
;    ]
;  }