I've populated a TWeb ClientDataSet (cdsPI) with JSON data from an endpoint. Now I want to store the data in a dynamic two-dimensional array (arrDynPI). I'll define this array as either an array or an array or a string. Next I create the code snippet below:
"cdsPI.First;
row := 0;
col := 1;
// fill arrPI
repeat SetLength(arrDynPI,row+1,col);
arrDynPI[row][0] := cdsPItems.FieldByName('name').AsString;
arrDynPI[row][1] := cdsPItems.FieldByName('username').AsString;
cdsPItems.Next;
Inc(row);
until(cdsPItems.Eof);"
However, the SetLength(arrDynPI,row+1,col) command seems to do nothing. In the debugger, arrDynPI remains set to zero (undefined). How to solve this?
