GetFirstElement method (NotesJSONObject - LotusScript)
Returns the first element in a JSON object.
Syntax
Set el = obj.GetFirstElement()
Parameters
None
Return value
The first NotesJSONElement in the object.
Example
The following example retrieves the object named “object1� and displays a message box with the
text "First object =
inner1:innerval1".
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.Getfirstelement()
Set el = el.value.GetelementByName("inner1")
MsgBox "First object = " & CStr(el.Name) & ":" & CStr(el.Value)