title: JSON object- how to iterate through all properties without knowing their names?
body: <p>I have a fairly simple JSON:</p>
  <pre class="lang-json prettyprint-override"><code>[
      {
        &quot;hero-img&quot;: &quot;girl-ipad.png&quot;,
        &quot;main-story-headline&quot;: &quot;How to Stay Mentally Healthy During a Pandemic&quot;,
        &quot;main-story-paragraph&quot;: &quot;lorem ipsum&quot;,
        &quot;main-story-button-text&quot;: &quot;Read More&quot;
      },
      {
        &quot;hero-img&quot;: &quot;painter-woman.png&quot;,
        &quot;main-story-headline&quot;: &quot;How to Stay Mentally Healthy During a Pandemic&quot;,
        &quot;main-story-paragraph&quot;: &quot;lorem ipsum&quot;,
        &quot;main-story-button-text&quot;: &quot;Explore More&quot;
      },
      {
        &quot;hero-img&quot;: &quot;old-man.png&quot;,
        &quot;main-story-headline&quot;: &quot;How to Stay Mentally Healthy During a Pandemic&quot;,
        &quot;main-story-paragraph&quot;: &quot;lorem ipsum&quot;,
        &quot;main-story-button-text&quot;: &quot;Get Yours Now&quot;
      } ]
  </code></pre>
  <p>By using Delphi 10.3 Rio, I want to iterate through all <strong>properties</strong> no matter how they are named. I've started this way:</p>
  <pre class="lang-pascal prettyprint-override"><code>program JuTemplates;
  
  {$APPTYPE CONSOLE}
  
  {$R *.res}
  
  uses
    System.SysUtils, System.JSON, System.IOUtils, System.Types;
  
  var
    root, OutputDir, TemplatesDir, JsonDir, jsonText: string;
    JsonFiles: TStringDynArray;
    i, j: Integer;
    JSONValue: TJSONObject;
    JSONValues: TJSONArray;
  begin
    try
  
      try
        root := ExtractFilePath(ParamStr(0));
        OutputDir := root + 'OutputDir\';
        TemplatesDir := root + 'TemplatesDir\';
        JsonDir := root + 'JsonDir\';
        writeln('Processing: ' + JsonDir);
        JsonFiles := TDirectory.GetFiles(JsonDir);
        for i := 0  to High(JsonFiles) do
        begin
          jsonText := TFILE.ReadAllText(JsonFiles[i]);
          JSONValues := TJSONObject.ParseJSONValue(jsonText) as TJSONArray;
  
          for j := 0 to JSONValues.Count - 1 do
          begin
            JSONValue := JSONValues.Items[i] as TJSONObject;
            // here I should iterate through that JSONValue object
          end;
        end;
      except
        on E: Exception do
          Writeln(E.ClassName, ': ', E.Message);
      end;
    finally
      writeln ('Press any key to continue');
      readln;
    end;
  end.
  </code></pre>