System.JSON.TJSONObject.GetEnumerator
Delphi
function GetEnumerator: TEnumerator; inline;
C++
TEnumerator* __fastcall GetEnumerator();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.JSON.pas System.JSON.hpp |
System.JSON | TJSONObject |
Description
Returns an enumerator that you can use to iterate through the JSON pairs in the current TJSONObject object.
The Current and MoveNext members of enumerator allow JSON pairs to be accessed using a for-in loop. Like in the following scratch:
MyJSONEnumerator := TJSONObject.GetEnumerator; while MyJSONEnumerator.MoveNext do begin MyJSONPair := MyJSONEnumerator.Current; // … end;