JavaScript
JavaScript
Create JSON Array of Strings
See more JSON Examples
Demonstrates how to create a JSON array of strings.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
// The goal of this example is to produce this:
// [
// "tag1",
// "tag2",
// "tag3"
// ]
var jarr = new CkJsonArray();
jarr.AddStringAt(-1,"tag1");
jarr.AddStringAt(-1,"tag2");
jarr.AddStringAt(-1,"tag3");
jarr.EmitCompact = false;
console.log(jarr.Emit());