I'm currently enjoying diving into Ember and learning a complete Front End MVC solution.
Currently, I'm a little stumped on getting data from our API as it doesn't follow the standard required by Ember's Adapter. Currently, our team are unable to change the structure of the API / JSON response due to the dependencies of third party applications.
RESTAdapter is looking for JSON like this:
{
'episodes' : [
{
id : '1',
title : 'my first title'
}
]
}
Unfortunately all we get back is an array with each episode as an object, i.e. it cannot be a key with a value of array of objects.
[
{
id : 1,
title : 'my first title'
},
{
id : 2,
title : 'my second title'
}
]
Can anyone provide assistance on how to extend DS.RESTAdapter to follow this format?
Again, our server devs cannot change the API so we have to take the JSON response as is.
Thanks