Length property (JSON)
- Last Updated: June 18, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Indicates the current length of the array.
This value can be both read and set. If it is set to a smaller value,
the array is truncated. Any element beyond the new smaller size
of the array is treated as if you call the JsonArray:Remove( ) on
them. If this value is set to a larger size, the array is extended
with null values as if JsonArray:AddNull( ) was
called.
Data type: INTEGER
Access: PUBLIC Readable/Writeable
Applies to: Progress.Json.ObjectModel.JsonArray class
Examples
The following example shows the current length of the array after adding elements.
|
The following example shows how setting the Length smaller, truncates the
array.
|
The following example shows how to use Length to extend the array with
null values.
|
The following example shows a common loop pattern where Length controls
iteration across all array elements.
|