title: JSoup fetching table from html page and converting it to JSON
body: <p>i have a table in a website which i am trying to scrape the table looks like this</p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;th&gt;Region&lt;/th&gt;
      &lt;th&gt;City&lt;/th&gt;
      &lt;th&gt;Code&lt;/th&gt;
      &lt;th&gt;Status&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;region one&lt;/td&gt;
      &lt;td&gt;city one&lt;/td&gt;
      &lt;td&gt;101&lt;/td&gt;
      &lt;td&gt;active&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;region one&lt;/td&gt;
      &lt;td&gt;city two&lt;/td&gt;
      &lt;td&gt;102&lt;/td&gt;
      &lt;td&gt;active&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;region three&lt;/td&gt;
      &lt;td&gt;city three&lt;/td&gt;
      &lt;td&gt;103&lt;/td&gt;
      &lt;td&gt;inactive&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;region four&lt;/td&gt;
      &lt;td&gt;city four&lt;/td&gt;
      &lt;td&gt;104&lt;/td&gt;
      &lt;td&gt;active&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;region five&lt;/td&gt;
      &lt;td&gt;city five&lt;/td&gt;
      &lt;td&gt;102&lt;/td&gt;
      &lt;td&gt;active&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/e4UyM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e4UyM.png" alt="enter image description here"></a></p>
  
  <p>i am able to scrape the website using andorid jsoup</p>
  
  <pre><code>  Document document = Jsoup.connect("URL").get();
  words = document.text();
  </code></pre>
  
  <p>this is where i have gone so far i am unable to isolate the table and put it in JSON </p>