title: Scrape a page with Javascript and then append a specific section to current page
body: <p>I'm trying to scrape and then pull out a specific section (section-two) to append to my current page.</p>
  
  <p><strong>Current page</strong></p>
  
  <pre><code>&lt;div id="container"&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $.ajax({
     url: "external.html",
     dataType: 'text',
     success: function(data) {
        var externalPage = data;
        $("#container").append(externalPage);
     }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>external.html</strong></p>
  
  <pre><code>&lt;div class="section-one"&gt;
    &lt;p&gt;Content I don't want&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="section-two"&gt;
    &lt;ul&gt;
      &lt;li&gt;one&lt;/li&gt;
      &lt;li&gt;two&lt;/li&gt;
      &lt;li&gt;three&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Ideal Result</strong></p>
  
  <pre><code>&lt;div id="container"&gt;
    &lt;div class="section-two"&gt;
      &lt;ul&gt;
        &lt;li&gt;one&lt;/li&gt;
        &lt;li&gt;two&lt;/li&gt;
        &lt;li&gt;three&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So far I have loaded the external page into a variable but I do not know how to filter out only the section I want to append. Can anyone help me out? Thanks in advance.</p>