Swift
Swift
AppendArrayItems Example
Demonstrates the AppendArrayItems function.Note: This example requires Chilkat v9.5.0.82 or above.
Chilkat Swift Downloads
func chilkatTest() {
let jarr1 = CkoJsonArray()!
jarr1.load(jsonArray: "[ 1, 2, 3, 4]")
let jarr2 = CkoJsonArray()!
jarr2.load(jsonArray: "[ 5, 6, 7, 8]")
jarr1.appendArrayItems(jarr: jarr2)
print("\(jarr1.emit()!)")
// Expected output: [1,2,3,4,5,6,7,8]
print("\(jarr2.emit()!)")
// Expected output: [5,6,7,8]
}