The information retrieved from my server is in the following format:
["admin", "user", "developer", "super"]
I am working on transforming this data into a new model structure represented by:
Ext.define('RoleModel', {
extend: 'Ext.data.Model',
//fields: [{}]
});
This is how my store is structured:
Ext.create('Ext.data.Store', {
model: 'RoleModel',
proxy: {
type: 'ajax',
url : '/roles',
reader: {
type: 'json'
}
},
autoLoad: true
});
Is there a way to correctly assign the single array received from the server to my RoleModel
?