C++
C++
AppendArrayItems Example
Demonstrates the AppendArrayItems function.Note: This example requires Chilkat v9.5.0.82 or above.
Chilkat C++ Downloads
#include <CkJsonArray.h>
void ChilkatSample(void)
{
CkJsonArray jarr1;
jarr1.Load("[ 1, 2, 3, 4]");
CkJsonArray jarr2;
jarr2.Load("[ 5, 6, 7, 8]");
jarr1.AppendArrayItems(jarr2);
std::cout << jarr1.emit() << "\r\n";
// Expected output: [1,2,3,4,5,6,7,8]
std::cout << jarr2.emit() << "\r\n";
// Expected output: [5,6,7,8]
}