안녕하세요. 이것이 Backbone.js의 첫 번째 문제입니다.구문 분석시 모델 수정
{
{title: "key1", description: "value1"},
{title: "key2", description: "value2"},
}
그래서 그것이 테이블로 출력 데이터에보다 쉽게 될 것입니다 :
{
"key1": "value1",
"key2": "value2",
}
이 IMO I가 구문 분석 방법을 변경해야합니다 : 나는 몇 시간이 JSON에서 rander하는 방법을 알아 냈 시도해도 보냈다 핸들 :이 모델에서 내 구문 분석 방법이다
<tr>
<td>{{title}}</td>
<td>{{description}}</td>
</tr>
parse : function (response) {
_.each(response, function (value, key, list) {
this.set({ "title": key, "description": value });
}, this);
return response;
}