0
我的API返回此response
響應:無法訪問從API正確
{"__v":0,"short":"8xdn4a5k","_id":"5404db5ac27408f20440babd","branches":[{"version":1,"code":""}],"ext":"js","language":"javascript"}
這工作:
console.log(response.short);
但這會產生undefined
:
console.log(response.branches.version);
怎麼來的?
分支是一個數組,嘗試'response.branches [0] .version' – Rooster 2014-09-01 20:53:22
謝謝 - 傻我! – tommyd456 2014-09-01 20:55:06