PDA

View Full Version : How to configure JsonReader for this simple structure



sytel
10 Feb 2011, 7:15 AM
I have the following Json structure to read:

{
"tom": 10,
"jack": 23,
"bill": 8,
"joe": 15,
"dan": 5
}

I'd like something like this:

var myReader = new Ext.data.JsonReader({
idProperty: '?'
root: '?',
fields: [
{name: 'name', mapping: '?'},
{name: 'posts', mapping: '?'}
]
});

What do i put in place of the question marks? I cannot alter the structure as it's an external source.