title: Angular5 HTTPclient get issue with nested json
body: <p>HttpClient.get in Angular 5 is not returning data if data is in a nested json format. The code below works for non-nested json data.
  Would you please let me know if I miss anything or what would be a way to get the data?</p>
  
  <p>Code:</p>
  
  <pre><code>import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
  
  export class ReportService {...
    searchByUser(userUrl: string): Observable&lt;any&gt; {
      console.log('userUrl', userUrl);
  
      return this.httpClient
                  .get(userUrl, { responseType: 'json'  })                                
                  .catch((error: HttpErrorResponse) =&gt; {
                    return Observable.throw(error.status)
                  });
    }
  
  
  }
  </code></pre>
  
  <hr>
  
  <pre><code>import { ReportService } from '../report.service';
  
  this.reportService.searchByUser(userUrl).subscribe(data =&gt; {
        console.log("Data :", data);
      });
  </code></pre>
  
  <hr>
  
  <p>Nested JSON Sample Data returned by the userUrl:</p>
  
  <pre><code>[
  {
  "userId": "JX",
  "location": "CHANTILLY, XX",
  "fullName": "SMITH, JX L",
  "userType": "P",
  "userStatusDesc": "Active",
  "occupationInfo": {
  "occupationTitle": "HR GENERALIST HQ"
  },
  "miscInfo": {
  "rankingPoints": 15,
  "searchTermCount": 1
  }
  }
  ]     
  </code></pre>