Returns all the element's in the array.


Result = SRP_Json(Handle, "GetElements", Delimiter)


Returns a dynamic array containing all the object's members as object handles.


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


The GetElements service returns a delimited list of all the elements in the given array. The list will contain only JSON object handles, but this can improve performance when you need to walk through an array since it gets all the handles in a single call.

This service only works if Handle is a JSON array. If it is not an array, the result will be "". Also, if the array has no elements, the result will be "". The Delimiter parameter is optional. If you omit the parameter, then @FM is used. Delimiter must be a single character.


// Create a JSON object
If SRP_Json(ObjectHandle, "New", "Array") then
   // Add some members to it
   SRP_Json(ObjectHandle, "Add", "John")
   SRP_Json(ObjectHandle, "Add", "Sally")
   // Get the list of elements, delimited by ~
   Elements = SRP_Json(ObjectHandle, "GetElements", '~')

   // If you want an @FM delimited list, just omit the last parameter
   Elements = SRP_Json(ObjectHandle, "GetElements")
   // Remember to release entities you've created
   SRP_Json(ObjectHandle, "Release")

See Also

GetCountGetValue, GetMembers

  • No labels