не могу понять как мне распарсить масив этого ответа
{"success":"1","days":"3","products":[{"1":{"id":"1","login":"33","password":"432","firstName":"23423","lastName":"234324","id_user":"1"},"2":{"id":"2","login":"2222","password":"2333","firstName":"3333","lastName":"34234","id_user":"1"}}]}
procedure DUAll;
var
JSONObject, JSONObjProp: TJSONObject;
JSONString: TJSONString;
JsonArray, JsonArrayCoord: TJSONArray;
i:integer;
begin
try
if http.Status() = 200 then
begin
frmAdmin.Memo1.Text:=http.responsetext;
JSONObject:=TJSONObject(TJSONObject.ParseJSONValue(http.responsetext));
if JSONObject <> nil then begin
JSONString:=TJSONString(JSONObject.GetPairByName('success').JsonValue);
if Pos('not session', JSONString.Value) > 0 then begin
timerAu.Enabled:=False;
frmAdmin.bAutorization.Caption:='Ошибка авторизации'; end else
if Pos('1', JSONString.Value) > 0 then begin
JSONString:=TJSONString(JSONObject.GetPairByName('days').JsonValue);
frmAdmin.bDays.Caption:='Осталось '+JSONString.Value+' дней';
JsonArray:=TJSONArray(JSONObject.GetPairByName('').JsonValue);
for i := 0 to JsonArray.Size-1 do begin
JSONString := TJSONString(TJSONObject(JsonArray.Get(i)).GetPairByName(i).JsonValue );
frmAdmin.Memo2.Text:=JSONString.Value;
end;
end;
end;
end;
except
//frmAdmin.bAutorization.Caption:='соединение...';
end;
end;