0
我的網址json是@_____,但我不能稱之爲。如何得到它? 感謝您的回答。如何調用JSON數據「@」
" RESULT":{
"FACET":[{ "@NAME" : "creator", "@COUNT" : "20",
"FACET_VALUES":[
{
"@KEY":"Book Company1",
"@VALUE":"13"},
{
"@KEY":"Book Company1์",
"@VALUE":"10"}
]
。
this.http.get("my_url")
.subscribe(data =>{
this.items=data.json().RESULT.FACET.FACET_VALUES;
},error=>{
console.log(error);
});
。
<ion-list>
<ion-item *ngFor="let item of items" (click)="itemClicked($event,item)">
<h2>{{item.[email protected]}}</h2> /////this error
<p>{{[email protected]}}</p> /////this error
<button ion-button clear item-right (click)="buttonClick($event)">View</button>
</ion-item>
</ion-list>
非常感謝!我能做到! – fongfuse