title: How to get text of an element?
body: <p>I am running the following:</p>
  
  <pre><code>$.getJSON(url,function(data){
  wikiHTML = data.parse.text["*"];
  $wikiDOM = $("&lt;document&gt;"+wikiHTML+"&lt;/document&gt;");
  if($wikiDOM.find(".infobox th:contains('Duration')").length &gt; 0) {
    $("#results").append("&lt;li&gt;" + $wikiDOM.find($(".infobox th:contains('Duration')").siblings("td").html()) + "&lt;/li&gt;");
    }
  });
  </code></pre>
  
  <p>I am getting a list with:</p>
  
  <blockquote>
    <p>[object Object]</p>
  </blockquote>
  
  <p>I should be getting a text that says:</p>
  
  <blockquote>
    <p>Long term</p>
  </blockquote>
  
  <p>The html where the text is:</p>
  
  <pre><code>&lt;th&gt;
     Duration
  &lt;/th&gt;
  &lt;td&gt;Long term&lt;/td&gt;
  </code></pre>
  
  <p><a href="https://jsfiddle.net/zt3ssajd/188/" rel="nofollow noreferrer">JsFiddle</a></p>