0
如何從響應數組中獲取對象數組值?下面是我的代碼發送Ajax請求如何從響應數組中獲取對象數組值
var post_data = {
"user_name_title" : $scope.user_name_title,
};
$http.post(url,post_data).then(function(res)
{
console.log(res['Message']);
},
輸出爲
{
"ResponseCode": 200,
"Data": [],
"Message": "Data inserted successfully.",
"Error": []
}
我怎樣才能得到結果對象,我已經使用
的console.log(RES [」信息']);
但它顯示未定義。我應該使用什麼?
看起來它應該工作,你可以發佈演示重現該問題? – elclanrs
錯誤 - 在位置1的JSON中的意外標記o 在Object.parse(本機) –