title: Getting an http post request back as json
body: <p>Struggling school teacher here so please be nice!
  I'm making an HTTP post request to our school database and the data comes back in the following form:</p>
  
  <pre><code>&lt;iSAMS&gt;&lt;PupilManager&gt;&lt;CurrentPupils&gt;&lt;Pupil Id="1313" AcademicHouseId="5" PersonGuid="747B8C20-878A-4867-AF09-7A5DCE2505E9"&gt;&lt;SchoolCode&gt;012324&lt;/SchoolCode&gt;
  </code></pre>
  
  <p>I've managed to use an xml2js function which is parsing the string data, then it stringifys the data, JSON.parses the data again before another function has to add it to an array. Is there a more efficient way of doing this?
  I've tried the <code>responseType: 'json'</code> and it gives an error regarding the &lt; character. Ultimately I would like to do something like <code>this.allStudents$ = this.http.post</code> and have the observable containing the IStudent[] data. Any help in condensing this code would be much appreciated!</p>