GetJSONMember()

Syntax

Result = GetJSONMember(JSONValue, Key$)
Description
Return the JSON object member with the given Key$ of a JSON value of type #PB_JSON_Object.

Parameters

JSONValue The JSON value. The value must be of type #PB_JSON_Object.
Key$ The key of the member to return.

The key is compared case sensitive unless the #PB_JSON_NoCase flag has been specified when creating or parsing the JSON data.

Return value

The address of the JSON value with the specified key. If the given 'Key$' does not exist in the object, the result is 0.

Example

  Input$ = "{ " + Chr(34) + "x" + Chr(34) + ": 10, " + 
                  Chr(34) + "y" + Chr(34) + ": 20, " + 
                  Chr(34) + "z" + Chr(34) + ": 30 }"
  
  ParseJSON(0, Input$)
  
  Debug GetJSONInteger(GetJSONMember(JSONValue(0), "x"))
  Debug GetJSONInteger(GetJSONMember(JSONValue(0), "y"))
  Debug GetJSONInteger(GetJSONMember(JSONValue(0), "y"))

See Also

SetJSONObject(), AddJSONMember(), RemoveJSONMember(), ClearJSONMembers(), ExamineJSONMembers(), JSONObjectSize(), JSONType()

Supported OS

All

<- GetJSONInteger() - Json Index - GetJSONQuad() ->