I want to set Data to a Dataview.list in a controller from a JSON Object.
Here is the json object
Object {1: "Mercedes", 2: "Aston Martin", 3: "Ferrari", 4: "Lamborgini"}
Now this is what I found in the docs:
Ext.create('Ext.List', {
fullscreen: true,
itemTpl: '{title}',
data: [
{ title: 'Item 1' },
{ title: 'Item 2' },
{ title: 'Item 3' },
{ title: 'Item 4' }
]
});
This does not work for me as I have the data coming from a JavaScript function. The function returns me the JSON Object mentioned above and then I want to do "setData"
Any ideas?
Any help would be appreciated.