title: Can't loop through a google sheet after 9 (returns 1 then 0)
body: <p>I'm have having a bit of trouble  setting up a dynamic google sheet to fetch data.  If the option value goes after 10, it will not work; the code returns the value as a separate 1 then 0.  And so on, value 11 would be 1 and 1.</p>
  <p>Any help would be awesome and thank you so so much!</p>
  <pre><code>&lt;select name=&quot;examples&quot; id=&quot;selectEvents&quot; class=&quot;my-events&quot;&gt;
      &lt;option value=&quot;&quot; placeholder=&quot;select&quot; selected&gt;Select&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;h2 class=&quot;event-name&quot; &gt;&lt;/h2&gt;
  &lt;h3 class=&quot;event-info&quot; &gt;&lt;/h3&gt;
  &lt;script&gt;
      //variables for spreadsheet
  
      const eventName = document.querySelector('.event-name');
      const eventInfo = document.querySelector('.event-info');
  
      //variables for sheet
      const sheetId = '1wJp22oIlG29X6FDszaPoh71IvbwrZYoWRqwwYy9gbQg';
      const base = `https://docs.google.com/spreadsheets/d/${sheetId}/gviz/tq?`;
      const sheetName = 'sheet1';
      const query = encodeURIComponent('Select *');
      const url = `${base}&amp;sheet=${sheetName}&amp;tq=${query}`;
  
      fetch(url)
          .then(res =&gt; res.text())
          .then(rep =&gt; {
              //Remove additional text and extract only JSON:
              const jsonData = JSON.parse(rep.substring(47).slice(0, -2));
  
              const dataRows = jsonData.table.rows;
              const select = document.getElementById('selectEvents');
  
              for (const r of dataRows) {
                  select.options[select.options.length] = new Option(r.c[1].v, Number(select.options.length + 1));
              }
  
              const selectElement = document.querySelector('.my-events');
  
              selectElement.addEventListener('change', event =&gt; {
                  for (let i of Object.values(selectEvents.value)) {
                      if (selectEvents.value === i) {
                          eventName.textContent = jsonData.table.rows[i - 2].c[1].v;
                          eventInfo.textContent = jsonData.table.rows[i - 2].c[2].v;
                      }
                  }
              });
          });
  &lt;/script&gt;
  </code></pre>