AppendObject method (NotesJSONArray - LotusScript)
Appends a NotesJSONObject to a NotesJSONArray.
Defined in
Return value
Returns a NotesJSONObject that was appended to a NotesJSONArray.
Example
Append object to an array named
"arr".
Dim session As New NotesSession()
Dim jsnav As NotesJSONNavigator
Dim arr As NotesJSONArray
Dim nestedObj As NotesJSONObject
Set jsnav = session.createJSONNavigator("")
Set arr = jsnav.appendarray("myarray")
Call arr.appendElement(1)
Call arr.appendElement(2)
Call arr.appendElement(3)
Set nestedObj = arr.appendObject
Call nestedObj.appendElement(4, "first element")
Call nestedObj.appendElement(5, "second element")
Call nestedObj.appendElement(6, "third element")
Result: :{"myarray":[1,2,3,{"first element":4,"second element":5,"third element":6}]}