I have returned data from server that contains page data that I am trying to use in a model. You can see the json here https://gist.github.com/bungdaddy/11152304. If you take a look at collection.template.data this is the data that I need in my model, which I have put together like so.
var PageTemplate = Ember.Object.extend();
PageTemplate.reopenClass({
all: function(){
return $.getJSON("http://myurl.com").then(function(response){
var pageTemplate = [];
var template = response.collection.template.data;
template.forEach(function(data){
pageTemplate.push(PageTemplate.create(data));
});
return pageTemplate;
});
}
});
export default PageTemplate;
This returns json, but my issue is, how in the template.hbs would I target an inner array like collection.template.data[10].acceptableValues? I could build a model just for this array, but I would like to have a PageTemplate with one call to the DB.