我有一個從服務器返回的JSON對象。JSON解析AngularJS
{
"SOAP-ENV:Envelope": {
"SOAP-ENV:Body": {
"ADDWEBSOperationResponse": {
"Num1": 10,
"Result": 20,
"Num2": 10,
"xmlns": "http://www.**.**.Response.com"
}
},
"xmlns:SOAP-ENV": "http://schemas.xmlsoap.org/soap/envelope/",
"xmlns:soapenv": "http://schemas.xmlsoap.org/soap/envelope/",
"xmlns:add": "http://www.**.**.Request.com"
}
}
我想在我的網頁打印Result
。我試着用data.Result
但它沒有顯示價值。
數據[鍵」 SOAP-ENV:Envelope]] [「SOAP-ENV:Body」] [「ADDWEBSOperationResponse」]結果 – aabilio
如果數據格式化爲字符串,請先執行此操作JSON.parse(data) –