我使用Backbone.js
库,但我的服务器以格式返回数据:
{
"status":"OK",
"message":"",
"data":{"table":{"id":"4","name":"\u0421\u0442\u043e\u043b 1","tableType":"0","chairNumber":"0","posX":"0","posY":"0","width":"0","height":"0","angle":"0","plan":"0"}}
}
Backbone只预计数据:
{"table":{"id":"4","name":"\u0421\u0442\u043e\u043b 1","tableType":"0","chairNumber":"0","posX":"0","posY":"0","width":"0","height":"0","angle":"0","plan":"0"}}
如何使用嵌套级别data
作为主干?
答案 0 :(得分:3)
parse: function (response, options) {
return response.data;
}