System.JSON.TJSONArrayEnumerator
Delphi
TJSONArrayEnumerator = class
C++
class PASCALIMPLEMENTATION TJSONArrayEnumerator : public System::TObject
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.JSON.pas System.JSON.hpp |
System.JSON | System.JSON |
Description
Iterator for items of JSON arrays.
To use an iterator to iterate a TJSONArray object, call GetEnumerator from the JSON array object to create a TJSONArrayEnumerator iterator, and use MoveNext and Current to iterate through the JSON values of the JSON array:
Delphi:
MyJSONArrayIterator := TJSONArrayEnumerator.Create(MyJSONArray);
while MyJSONArrayIterator.MoveNext do
begin
MyJSONValue := MyJSONArrayIterator.Current;
// …
end;
C++:
TJSONArrayEnumerator* MyJSONArrayIterator = new TJSONArrayEnumerator(MyJSONArray);
while (MyJSONArrayIterator->MoveNext())
{
TJSONValue* MyJSONValue = MyJSONArrayIterator->Current;
// …
}