(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
program ParseJSON;

{$APPTYPE CONSOLE}

uses
  System.SysUtils, System.IOUtils, System.JSON;

var
  lst, imgs : TJSONArray;
  elm, img : TJSONObject;
  src : string;
  i, j : integer;

begin
  lst := TJSONObject.ParseJSONValue(TEncoding.UTF8.GetBytes(TFile.ReadAllText('data.json')), 0) as TJSONArray;
  for i := 1 to lst.Count do begin
    elm := lst.Items[i - 1] as TJSONObject;
    imgs := elm.GetValue('images') as TJsonArray;
    for j := 1 to imgs.Count do begin
      img := imgs.Items[j - 1] as TJSONObject;
      src := img.GetValue('src').ToString;
      writeln(src);
    end;
  end;
end.
