JavaScript
Data
Run Code
Open in Fiddle
Ext.application({ name : 'Fiddle', launch : function() { Ext.define('User', { extend: 'Ext.data.Model', idProperty: 'userId', fields: [ 'userId', 'username' ], proxy: { type: 'ajax', url: 'user.json', reader: { type: 'json' } } }, function(userClass){ // outputs 2 fields: userId, username console.log(userClass.getFields()); }); } });