GetElementByName method (NotesJSONObject - LotusScript)

Returns a JSON object represented by "name".

Defined in

NotesJSONObject

Syntax

Set el = obj.Getelementbyname("name")

Parameters

name

String.

Return value

JSON object.

Example

The following example retrieves the object named "object1" and displays a message box with the text "object1 = 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.Getelementbyname("object1")
Set el = el.value.GetelementByName("inner1")
MsgBox "object1 = " & CStr(el.Name) & ":" & CStr(el.Value)