Copy method (NotesJSONElement - LotusScript)

Copy value from a NotesJSONElement to another NotesJSONElement.

Note: This method is new with release 14.5.1.

Defined in

NotesJSONElement

Parameters

NotesJSONElement

Example

Copy Element value to another Element.
    Dim session As New NotesSession
    Dim jsnav As NotesJsonNavigator
    Dim ele As NotesJSONElement
    Dim s As String	
    Dim jsnav1 As NotesJsonNavigator
    Dim ele1 As NotesJSONElement
    Set jsnav1 = session.CreateJSONNavigator("")
    
    s = |{"name":"John Doe","age":30,"contact":{"email":"john.doe@example.com","phone":"555-1234"}}|
    Set jsnav = session.CreateJSONNavigator(s)
    
    REM copy all element
    Set ele = jsnav.GetFirstElement()
    While Not (ele Is Nothing) 
    Set ele1 = jsnav1.AppendElement("", ele.Name)
    Call ele1.Copy(ele)
    Set ele = jsnav.GetNextElement()
    Wend
    'Result: {"name":"John Doe","age":30,"contact":{"email":"john.doe@example.com","phone":"555-1234"}}