Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Result = SRP_Json(Handle, "GetMemberGetMembers", Delimiter)

Returns

Returns a dynamic array containing all the object's member names.

...

ParameterDescription
HandleHandle to a JSON Entity. Required.
DelimiterThe delimiter to use between each member name. Optional.

Remarks

The GetMember 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.

...

Code Block
// 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, "GetMemberGetMembesr", '~')

   // If you want an @FM delimited list, just omit the last parameter
   Members = SRP_Json(ObjectHandle, "GetMemberGetMembers")

   // Remember to release entities you've created
   SRP_Json(ObjectHandle, "Release")
   
 end

See Also

GetCountGetValue, GetElements