React Native
React Native
JSON Append String Array
See more JSON Examples
Demonstrates how to append an array of strings from a string table object.Note: This example uses the AppendStringTable method, which was introduced in Chilkat v9.5.0.67
Chilkat React Native Downloads
import { JsonObject, StringTable } from '@chilkat/react-native'
function chilkatExample() {
const json = new JsonObject();
json.emitCompact = false;
json.appendString('abc', '123');
const st = new StringTable();
st.append('a');
st.append('b');
st.append('c');
st.append('d');
json.appendStringArray('strArray', st);
console.log(json.emit());
// Output:
// {
// "abc": "123",
// "strArray": [
// "a",
// "b",
// "c",
// "d"
// ]
// }
}