I have a fetch request which response looks like this.
response = {
id: 1,
title: 'text',
followers: [{}, {}] // array of objects
}
As you can see the response is an object which have an attribute follower which is an array of object.
I would like to create from this response one model and one collection, one which have the following attributes:
response = {
id: 1,
title: 'text'
}
and the other one, a collection of models
followers: [{}, {}];
What is the appropriate way to active my goal?
Could I use Backbone.Relation?
If yes, there are some example?