AppendArray method (NotesJSONArray - LotusScript)

Appends a NotesJSONArray to a NotesJSONArray.

Defined in

NotesJSONArray (LotusScript)

Parameters

name
String. Optional. Name of the array.

Return value

Returns a NotesJSONArray that was appended to the NotesJSONArray.

Example

Append array named "nestedArr" to an array named "arr".

Dim session As New NotesSession()
Dim jsnav As NotesJSONNavigator
Dim arr As NotesJSONArray
Dim nestedArr As NotesJSONArray
Set jsnav = session.createJSONNavigator("")
Set arr = jsnav.appendarray("myarray")
Call arr.appendElement(1)
Call arr.appendElement(2)
Call arr.appendElement(3)
Set nestedArr = arr.appendArray()
Call nestedArr.appendElement(4)
Call nestedArr.appendElement(5)
Call nestedArr.appendElement(6)

Result:{"myarray":[1,2,3,[4,5,6]]}