title: Variable in for loop is not getting called
body: <p>I am using DBXJson to parse a simple json file called <code>response.json</code>and show it's contents in a grid, but only the first row of the grid ever gets populated with the data and even though there is more rows/data to display. I am using a custom grid in the code below but I have tried a variation of the below code using the standard stringgrid and it exhibited the same behavior. This is the code I am using to parse the response and show it in my grid.</p>
  
  <pre><code>var
    sl: TStringList;
    LJsonArr: TJSONArray;
    LJsonValue: TJSONValue;
    LItem: TJSONValue;
    col, row: Integer;
  begin
    col := 0;
    row := 0;
  
    sl := TStringList.Create;
    sl.LoadFromFile('response.txt');
    LJsonArr := TJSONObject.ParseJSONValue(TEncoding.UTF8.GetBytes(sl.text), 0)
      as TJSONArray;
  
    for LJsonValue in LJsonArr do
    begin
      NextGrid1.AddRow();
  
      for LItem in TJSONArray(LJsonValue) do
      begin
        NextGrid1.Cells[col, row] := TJSONPair(LItem).JsonValue.Value;
        inc(col);
      end;
      inc(row);
    end;
    sl.Free;
  end;
  </code></pre>
  
  <p>I suspect that the problem lies in the fact that the <code>row</code> variable is out of place and is not getting called and that is causing only the first row to display, but I could be mistaken and I am hoping that a fresh pair of eyes can spot the problem.</p>