Returns a list of a JSON object's members.
Syntax
Result = SRP_Json(Handle, "GetMembers", Delimiter)
Returns
Returns a dynamic array containing all the object's member names.
Parameters
Parameter | Description |
---|---|
Handle | Handle to a JSON Entity. Required. |
Delimiter | The delimiter to use between each member name. Optional. |
Remarks
The GetMembers service returns a list of all member names within a JSON object. It does not return the members' values, only their names. If you need a member's value, then you can use the GetValue service.
This service only works if Handle is a JSON object. If it is not an object, the result will be "". Also, if the object has no members, the result will be "". The Delimiter parameter is optional. If you omit the parameter, then @FM is used. Delimiter must be a single character.
Example
// Create a JSON object If SRP_Json(ObjectHandle, "New", "Object") then // Add some members to it SRP_Json(ObjectHandle, "SetValue", "name", "John Doe") SRP_Json(ObjectHandle, "SetValue", "city", "Washington D.C.") // Get the list of members, delimited by ~ Members = SRP_Json(ObjectHandle, "GetMembers", '~') // If you want an @FM delimited list, just omit the last parameter Members = SRP_Json(ObjectHandle, "GetMembers") // Remember to release entities you've created SRP_Json(ObjectHandle, "Release") end