Endpoint returning object instead of direct JSON

I am trying to fetch the value of ServiceProvider in my component but instead I am getting undefined because ServiceProvider is inside return and I don't know how to fetch the value.

return: {     
 issuerName: "ABC",
 ServiceProvider: "1"     
}

instead of

{     
 issuerName: "ABC",
 ServiceProvider: "1"     
}

My code in component is as below

this.validateService.getDataResponse(getData).subscribe(response => {
   if (response.data.serviceProvider == '1' || response.data.serviceProvider == '2') { 
      //... Some login here ...//
   }
}

If I write data.return.serviceProvider it gives me an error saying "Property does not exist on type 'GetDataResponse'"

Here's GetDataResponse :

export class GetDataResponse {
  public data: DataObj;
}

DataObj:

export class DataObj{
  public issuerName: string;
  public serviceProvider: string;
}

I am an angular developer with very basic knowledge on SpringBoot. Please help me get the response directly.