i use a store with a model. The jason has a value i want to use in an alert. The json is like this
{"slapen":[{"naam":"test","leeftijd":"43"},{"naam":"test2","leeftijd":"27"}]}
i want to display an alert for the first result. So when the store is loaded i want an alert like this
alert('De eerste winnaar is {here_comes_leeftijd} jaar');
so the number is what i want to show. Is this possible?
winnaars = new Ext.data.Store({
model: 'stepDetails',
pageSize: 20,
loadMask: false,
sortOnLoad: true,
proxy: {
type: 'ajax',
url: detailURL,
startParam: '',
limitParam: '',
pageParam: '',
reader: {
type: 'json',
root: 'slaevents'
}
},
autoLoad: false
});