Hello I have the following JSON provided from a server. With this I want to create a model with a nested model.
//json
{
"2": {
"sheet_id": 2,
"distribution_id": 4,
"areas": {
"1": {
"area_id": "1",
"image_id": "164"
},
"2": {
"area_id": "2",
"image_id": "164"
}
}
},
"3": {
"sheet_id": 3,
"distribution_id": 4,
"areas": {
"1": {
"area_id": "1",
"image_id": "165"
},
"2": {
"area_id": "2",
"image_id": "164"
}
}
},
}
I want these to be converted to two nested backbone models with the following structure:
Structure
Project has many Sheets and Sheet has many Areas