Calling convention: CIP_JSON_ArraySize(JSONObjectPointer: NativeInt, "ArrayPath": String): Integer
Description: Returns the number of elements in the JSON array at the specified path.
Parameters:
JSONObjectPointer = Valid pointer to a managed JSON value.
ArrayPath = Path of the JSON array. Use an empty string for a root array.
Returns: Integer: array size; NULL if the path is not found. An invalid pointer or a non-array value raises an exception.
Availability: Default.
Example:
try
WorkJSONString := "{
""name"":""John"",
""results"":[5234,2345,1221]
}";
JSONObj := CIP_JSON_CreateObject(WorkJSONString);
Result := CIP_JSON_ArraySize(JSONObj, "results");
finally
CIP_JSON_FreeObject(JSONObj);
end;