GetNthElement method (NotesJSONObject - LotusScript)
Retrieves the element from the JSON object represented by the provided index.
Defined in
Syntax
Set el = obj.Getnthelement(Index)
Parameters
Index
Integer.
1-based index that identifies which element to return.
Return value
The next NotesJSONElement in the object.
Example
The following example retrieves the object named "object3" and displays a message box with the
text "Nth (3)=
inner3:innerval3".
Set jsnav = s.CreateJSONNavigator(|{"objects":{"object1": {"inner1":"innerval1"},"object2": {"inner2":"innverval2"}, "object3": {"inner3":"innverval3"}}}|)
Set el = jsnav.Getfirstelement()
Set obj = el.Value
Set el = obj.GetNthElement(3)
Set obj = el.value
Set el = obj.GetElementByName("inner3")
MsgBox "Nth (3) object = " & CStr(el.Name) & ":" & CStr(el.Value)