TJArray Class
Represents a JSON array containing an ordered list of TJElement values.
Remarks
TJArray provides methods to add, delete, and access elements by index.
It supports enumeration via for..in loops. Elements are owned by the array and are freed when the array is destroyed or when elements are removed.
Syntax
Unit: Bcl.Json.Classes
TJArray = class(TJElement);
Constructors
| Name | Description |
|---|---|
| Create | Creates a new empty JSON array. |
Methods
| Name | Description |
|---|---|
| Clone | Creates a deep copy of this JSON array, including all contained elements. |
| Add | Overloaded Add(TJElement) Add(string) Add(Integer) Add(Int64) Add(Double) Add(Boolean) |
| Delete | Deletes the element at the specified index from the array. |
| GetEnumerator | Returns an enumerator for iterating over the elements in this array. |
Properties
| Name | Description |
|---|---|
| Count | Gets the number of elements in the array. |
| Items[const Index] | Gets or sets the element at the specified index. |
| Length | Gets the number of elements in the array. Alias for Count provided for JavaScript compatibility. |