我試圖直接訪問JSON對象的屬性和記錄它,這是我的功能:訪問JSON對象的屬性直接登錄其
loadProcesses(filter?){
this._postService.getAllProcess(filter)
.subscribe(
res=> {
this.processListe = res;
// console.log(this.processListe.)
}
,null,
() =>{
console.log("get processes liste" + filter)
});
所以this.processListe包含一個JSON對象,我的JSON格式是這樣的:
{"Person": {
"id": "A256",
"name": "GET",
"status": "active",
"description": "hardworking, openminded",
...
因此,這將包含完全相同的東西,例如,如果我想簡單地打印在控制檯日誌我怎麼能做到這一點的標籤?
謝謝你,它確實只顯示第一個Propretie它是一個包含它下面它自己propertie的對象,我怎麼可以訪問thos情況下的子屬性? – Anna
編輯我的答案以支持嵌套json –
非常感謝你,我會根據自己的需要對它進行改進再次感謝你 – Anna