ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 254.7k

How to return company name from service json ?

Jan 1 2020 7:04 AM
cannot return company name from json 
i have company service as below :
  1. getCompanyDetails(companyID) {  
  2.     return this.http.get(this.rootURL + companyID);  
  3.   }  
This service above return following json :
  1. {"CompanyID":0,"CompanyName":"ASE Industrial Holding Co., Ltd.","CountryName":"Taiwan","LogoSourceUrl":null,"MainWebSite":"http://www.aseglobal.com/","CompanyType":"Public","Taxonomy":"Test \u0026 Assembly","RevenueYear":"","TotalRevenue":"","YearToYearGrowth":"","NumberOfEmployees":"1017","Score":"","NumberMergerAndAcquisitions":"3"}  
I need to return  value  ASE Industrial Holding Co., Ltd
to attribute  CompanyName
 
  1. companyname: string;  
  2. this.companyService.getCompanyDetails(CompanyID)  
  3. this.companyname=???????????????  
how to call service to return value of CompanyName based on CompanyId
 

Answers (6)