GetNthElement method (NotesJSONArray - LotusScript)

Returns the JSON element at a specified position in an array.

Defined in

NotesJSONArray

Syntax

Set el = jsarray.GetNthElement(Index)

Parameters

Index

Integer

1-based index that identifies which element to return.

Return value

Returns nth NotesJSONElement in the array.

Example

The following code displays a message box with the value 4.
Set jsnav = s.CreateJSONNavigator(|{"numbers:" : [1,2,3,4,5]}|)
Set el = jsnav.GetFirstElement()
Set arr = el.value
Set el = arr.GetnthElement(4)
MsgBox "Nth element: " & CStr(el.Value)