I have an AngularJS app that I am converting to use js-data. If I have a REST interface that returns a JSON object in this format
{
data: {
id: 1,
name: Test,
dept: 2
},
related: {
DeptList: [
{ Id: 1, Name: Dept1 },
{ Id: 2, Name: Dept2 },
{ Id: 3, Name: Dept3 }
]
}
}
how do I go about extracting related.DeptList and injecting it into js-data? I have a deserialize function that can return the data object, but can't see how to extract the related data.