財產圖片,我有以下JSON無法讀取的不確定
{
"error": false,
"data": {
"id": 1,
"name": "Jagadesha NH",
"email": "[email protected]",
"phone": "9986XXXXXX",
"dob": "1991-06-01",
"gender": "m",
"active": 1,
"created_at": "2017-02-19 21:33:04",
"updated_at": "2017-02-19 21:33:04",
"profile": {
"id": 1,
"user_id": 1,
"picture": "https:\/\/placehold.it\/150x150",
"about": null,
"occupation": null,
"created_at": "2017-02-19 21:33:04",
"updated_at": "2017-02-19 21:33:04"
}
},
"msg": ""
}
每次我嘗試讀取圖片屬性我得到一個錯誤說時間
性質圖片無法讀取的不確定
我正在閱讀像
data.profile.picture
如果這是來自服務器的響應,你必須向我們展示你的js函數調用服務器 – nivas
你可以請檢查「json」是json格式還是字符串格式? – Eddie
你需要在'data.profile.picture'前加上''object'和''''符號的名字。也就是''your_object.data.profile.picture' –