(Classic ASP) AppendArrayItems Example
Demonstrates the AppendArrayItems function.
Note: This example requires Chilkat v9.5.0.82 or above.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.JsonArray")
set jarr1 = Server.CreateObject("Chilkat.JsonArray")
success = jarr1.Load("[ 1, 2, 3, 4]")
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.JsonArray")
set jarr2 = Server.CreateObject("Chilkat.JsonArray")
success = jarr2.Load("[ 5, 6, 7, 8]")
success = jarr1.AppendArrayItems(jarr2)
Response.Write "<pre>" & Server.HTMLEncode( jarr1.Emit()) & "</pre>"
' Expected output: [1,2,3,4,5,6,7,8]
Response.Write "<pre>" & Server.HTMLEncode( jarr2.Emit()) & "</pre>"
' Expected output: [5,6,7,8]
%>
</body>
</html>
|