Page History
...
Syntax
Code Block |
---|
Result = SRP_JSONJson(Handle, "GETMEMBERSGetMember", 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 GetMember 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 GETVALUEGetValue 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
Code Block |
---|
// Create a JSON object If SRP_JSONJson(ObjectHandle, "NEWNew", "OBJECT") then // Add some members to it SRP_JSONJson(ObjectHandle, "SETVALUESetValue", "name", "John Doe") SRP_JSONJson(ObjectHandle, "SETVALUESetValue", "city", "Washington D.C.") // Get the list of members, delimited by ~ Members = SRP_JSONJson(ObjectHandle, "GETMEMBERSGetMember", '~') // If you want an @FM delimited list, just omit the last parameter Members = SRP_JSONJson(ObjectHandle, "GETMEMBERSGetMember") // Remember to release entities you've created SRP_JSONJson(ObjectHandle, "RELEASERelease") end |