GetNthElement method (NotesJSONNavigator – LotusScript)

Retrieves the element from the JSON string represented by the provided index.

Defined in

NotesJSONNavigator

Syntax

Set el = jsnav.GetNthElement (index)

Parameters

index

Integer

1-based index that identifies which element to return.

Return value

Returns NotesJSONElement that corresponds to the first element in the JSON string.

Example

The following code returns an element with the name "element2" and a value of "Another string".
Dim jsnav As NotesJSONNavigator
	
Set jsnav = s.CreateJSONNavigator(
|{ "element1" : "A string", "element2" : "Another string", "element3 ": "Third string" }|)	

Set el = jsnav.GetNthElement(2)