title: How can I remove certain element types from a raw HTML response?
body: <p>I am making a request to the wiki API, similar <a href="https://en.wikipedia.org/w/api.php?format=json&amp;action=query&amp;prop=extracts&amp;titles=Country" rel="nofollow noreferrer">this request for the Wiki page content on the term 'country'</a>. I am reading the 'extract' from the response in Typescript/Javascript, and rendering that as HTML on the page of my application.</p>
  
  <p>How can I remove elements from the response? </p>
  
  <p>I would like to remove all &lt; li > objects, and if possible also remove all content AFTER the element with an id of 'Further Reading'. </p>
  
  <p>I am using this to grab the 'extract' section of the JSON:</p>
  
  <pre><code>let pageId = Object.keys(data.query.pages)[0];
  let page = data['query']['pages'][pageId];
  resolve(data['query']['pages'][pageId]['extract']);
  </code></pre>
  
  <p>Here is the function call:</p>
  
  <pre><code>this.goWiki().then(result =&gt; {
              this.info= result.toString();
          });
  </code></pre>
  
  <p>Here is the HTML render:</p>
  
  <pre><code> &lt;div *ngIf="info" [innerHTML]="info"&gt;
  
        &lt;/div&gt;
  </code></pre>