Copy method (NotesJSONArray - LotusScript)
Copy value from a NotesJSONArray.
Defined in
Parameters
NotesJSONArray
Example
Copy value from array named "myarray" to array name
“myarray1”.
Dim session As New NotesSession()
Dim jsnav As NotesJSONNavigator
Dim arr As NotesJSONArray
Dim nestedArr As NotesJSONArray
Dim jsnav1 As NotesJSONNavigator
Dim arr1 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]]}
REM Copy array
Set jsnav1 = session.createJSONNavigator("")
Set arr1 = jsnav1.AppendArray("myarray1")
Call arr1.Copy(arr)
'Result:{"myarray1":[1,2,3,[4,5,6]]}