Sample code for 30+ languages & platforms
Perl Requires Chilkat v9.5.0.82+

AppendArrayItems Example

Demonstrates the AppendArrayItems function.

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $jarr1 = Chilkat2::JsonArray->new;
$jarr1->Load('[ 1, 2, 3, 4]');

my $jarr2 = Chilkat2::JsonArray->new;
$jarr2->Load('[ 5, 6, 7, 8]');

$jarr1->AppendArrayItems($jarr2);

print $jarr1->Emit(), "\n";
# Expected output: [1,2,3,4,5,6,7,8]

print $jarr2->Emit(), "\n";
# Expected output: [5,6,7,8]