1
我有以下JSON。在骨幹模型中存儲部分嵌套JSON
[
{
"FirstName": "John",
"SecondName": "Steve",
"Children":{
"results":[
{
"name":"Sue Anderson"
},
{
"name":"Jeff Anderson"
},
{
"name":"Mary Sanders"
}
]
}
},
{
"FirstName": "gary",
"SecondName": "Steve",
"Children":{
"results":[
{
"name":"nick"
},
{
"name":"Jerry"
},
{
"name":"tom"
}
]
}
}
]
我有一個骨幹模型規範來表示它。
var FamilyData= Backbone.Model.extend({
defaults: {
FirstName: '',
SecondName:'',
Children:''
}
});
如何將該兒童部分作爲數組存儲在模型中?