This SO question explains how to store an array in an Ember model, but how could it be done with a custom object, which also isn't supported natively supported, according to the Guides.
This is an example of the object that I am building
obj[0] = {"timeInMinutes": ">120", "occurrences": 24 };
obj[1] = {"timeInMinutes": "90-120","occurrences": 69 };
obj[2] = {"timeInMinutes": "60-90", "occurrences": 53 };
obj[3] = {"timeInMinutes": "30-60", "occurrences": 35 };
obj[4] = {"timeInMinutes": "0-30", "occurrences": 24 };
Update.
Using the information provided in this answer, I was able to create an array attribute on my model along with several other values, but I also want to be able to create DS.attr('object')
attribute to be used like this. To create an object type, do I need to use a DS.Transform.extend({
as was done with the array in the linked to SO answer?
App.Index = DS.Model.extend({
names: DS.attr('array'),
country: DS.attr('string'),
statistics: DS.attr('object')