JSONLength(JSONArray: Object): Number
Returns the length of a JSON Array.
JSONLength function has these named arguments:
Parameter |
Description |
JSON Array |
Required. The JSON Array to return the length of. |
The following sample code creates a JSON object based on IN Invoice Data, then creates a JSON array, then returns the length of the JSON array.
Sample code:
Dim datINInvoice as Object
datINInvoice = CreateObject("Accredo.INInvoiceData")
Dim JSON as Object
JSON = BuildJSON(datINInvoice, "CustomerCode;DocumentNo;DocumentID;Line", "Charge;Banking")
Dim Json Array as Object
JsonArray = JSONCreateArray(JSON, "CustomerCode;DocumentNo")
Dim ArrayLength as Number
ArrayLength = JSONLength(JsonArray)