Tcl
Tcl
AppendArrayItems Example
Demonstrates the AppendArrayItems function.Note: This example requires Chilkat v9.5.0.82 or above.
Chilkat Tcl Downloads
load ./chilkat.dll
set jarr1 [new_CkJsonArray]
CkJsonArray_Load $jarr1 "[ 1, 2, 3, 4]"
set jarr2 [new_CkJsonArray]
CkJsonArray_Load $jarr2 "[ 5, 6, 7, 8]"
CkJsonArray_AppendArrayItems $jarr1 $jarr2
puts [CkJsonArray_emit $jarr1]
# Expected output: [1,2,3,4,5,6,7,8]
puts [CkJsonArray_emit $jarr2]
# Expected output: [5,6,7,8]
delete_CkJsonArray $jarr1
delete_CkJsonArray $jarr2