/* Include the necessary namespace for JsonArray */
USING Progress.Json.ObjectModel.*.
DEFINE VARIABLE myParser AS ObjectModelParser NO-UNDO.
DEFINE VARIABLE oJsonArray AS JsonArray NO-UNDO.
DEFINE VARIABLE iArrayLength AS INTEGER NO-UNDO.
DEFINE VARIABLE myJsonString AS CHARACTER INITIAL '["Apple","Banana","Cherry","Date"]'.
myParser = NEW ObjectModelParser().
oJsonArray = CAST(myParser:Parse(myJsonString ), JsonArray).
/* Get the length of the JSON array */
iArrayLength = oJsonArray:Length.
MESSAGE "The length of the JSON array is:" iArrayLength
VIEW-AS ALERT-BOX.