Answer the question
In order to leave comments, you need to log in
How to work with nested models in Backbone?
How to work with server responses that contain a link to other data located at a different URL?
For example, the server response may be as follows (we get two objects that contain three links to child elements each. Data on child elements are located at the corresponding URLs):
[
{
"id": 1,
"url": "/api/itemCollection/1/",
"items": [
"/api/item/1/",
"/api/item/2/",
"/api/item/3/"
]
},
{
"id": 2,
"url": "/api/itemCollection/2/",
"items": [
"/api/item/1/",
"/api/item/4/",
"/api/item/5/"
]
}
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question