Object Undefined when binding data from an Observable

This question might have been answered somewhere but solutions provided are not working for me or I’m not using them properly. I have a service that returns data from a call to .net core API. The data is returned but I cannot bind it to an object.

The data is returned by the following Company.Service.ts

export class CompanyListRequest{
    UserID: number


import { CompanyListRequest } from '@app/_models/Company/CompanyListRequest';
 import { CompanyListViewModel } from '@app/_models/Company/CompanyListViewModel';

  providedIn: 'root'

export class CompanyService {
  private companyListRequest : CompanyListRequest;

  constructor(private http: HttpClient) { 
    this.companyListRequest = {
      UserID:2, //For simplicity

      return this.http.post<CompanyListViewModel[]>(`${environment.apiUrl}/Company/GetCompanyDetails`,this.companyListRequest);

I’m trying to get data here for binding to front end.


import { CompanyListViewModel } from '@app/_models/Company/CompanyListViewModel';

export class CompanyListComponent implements OnInit {
  public data: Observable<CompanyListViewModel[]>;

      private companyService: CompanyService,
      private alertService: AlertService
      ) {


ngOnInit() {

        data => {
           this.data = data["ResponseObject"]; //this.data is Undefined
        error => {


console.log(data["ResponseObject"]) //Returns the following:
{Id: 1, CompanyName: "Kim Investments", LegalName: "Kim Investments", HoldingCompany: "Kim Investments", RegistrationNumber: "PJ/90390/998"}

this.data is Undefined. I have checked the CompanyListViewModel and properties are matching with what is returned.

Source: New feed
Source Url Object Undefined when binding data from an Observable