I work on angular 7 I face Issue : I can't separate values of ZCO by comma from array of object OriginCountry .
on component.ts
- OriginCountry:any[]=[];
- this.OriginCountry = this.partDetailsService.currentData.OriginCountry;
- console.log("country origion" + JSON.stringify(this.OriginCountry) )
result returned from OriginCountry as below :
- [{"CO":"zx","ZCO":"China","InfSrc":"FMD","TP":"Factory"},
- {"CO":"zy","ZCO":"Japan","InfSrc":"FMD","TP":"Factory"}]
ON Component.html
- <div *ngFor="let country of OriginCountry">
- {{country.ZCO}}
- </div>
Expected Result of ZCO as :
Japan,China