title: Get list inside list in google spreadsheet
body: <p>I have this table in google spread sheet.
  <a href="https://i.stack.imgur.com/dSHvg.jpg" rel="nofollow noreferrer">spreadsheet image</a></p>
  <p><strong>table head is merged</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;"></th>
  <th style="text-align: center;">Monday</th>
  <th style="text-align: center;"></th>
  <th style="text-align: left;"></th>
  <th style="text-align: center;">Tuesday</th>
  <th style="text-align: right;"></th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">Morning</td>
  <td style="text-align: center;">Afternoon</td>
  <td style="text-align: center;">Evening</td>
  <td style="text-align: left;">Morning</td>
  <td style="text-align: center;">Afternoon</td>
  <td style="text-align: right;">Evening</td>
  </tr>
  <tr>
  <td style="text-align: left;">Breakfast</td>
  <td style="text-align: center;">Pick Bro</td>
  <td style="text-align: center;">Dinner</td>
  <td style="text-align: left;">Breakfast</td>
  <td style="text-align: center;">Pick Bro</td>
  <td style="text-align: right;">Dinner</td>
  </tr>
  <tr>
  <td style="text-align: left;">Cleaning House</td>
  <td style="text-align: center;"></td>
  <td style="text-align: center;">Reading Book</td>
  <td style="text-align: left;">Reading Book</td>
  <td style="text-align: center;"></td>
  <td style="text-align: right;">Go to Grand Dad</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>with get range</p>
  <pre><code>function testing() {
    var spreadsheet = SpreadsheetApp.getActiveSheet();
    var gr = spreadsheet.getRange(&quot;A1:F4&quot;).getValues();
    Logger.log(gr)
  }
  </code></pre>
  <p>I got</p>
  <pre><code>[
   [Monday, , , Tuesday, , ],
   [Morning, Afternoon, Evening, Morning, Afternoon, Evening],
   [Breakfast, Pick Bro, Dinner, Breakfast, Pick Sis, Dinner],
   [Cleaning House, , Reading Book, Reading Book, , Go to Grand Dad]
  ]
  </code></pre>
  <p>But the result I need to do loop is</p>
  <pre><code>[
   [Monday,
    [Morning,[Breakfast,Cleaning House]]
    [Afternoon,[Pick Bro]]
    [Evening,[Dinner,Reading Book]]
   ],
   [Tuesday,
    [Morning,[Breakfast,Reading Book]]
    [Afternoon,[Pick Sis]]
    [Evening,[Dinner,Go to Grand Dad]]
   ],
  ]
  </code></pre>
  <p>it looks like looping by column, not row. How can I get this result?</p>