PDA

View Full Version : nested json parsing in list



manish khamar
10 Aug 2011, 11:03 PM
hello

I able to parse simple json in list field as below:
-----------------------------------------------------------------------------------------
var c = new Ext.data.Store({
autoLoad: true,
proxy: {
type: 'ajax',
url: 'trial.json',
reader: {
type: 'json'
}
}
,fields: ['address','city','state','zip','price','beds','baths','sqft','latitude','longitude']
});


var list = new Ext.List({
fullscreen : true,
singleSelect : true,
store : c,
itemTpl : '<div >{price}</div>,
centered : true,
emptyText : 'No Data Availabel',
listener: {
}
});
-------------------------------------------------------------------------------------------
trial.json:

[{"srno":"0","price":"$1,500,000",
"picture":[{"url":"http://img3.terabitz.com/mls/NNRMLS/img/10/001/2257/1.jpg"}]},
{"srno":"1","price":"$2,500,000",
"picture":[{"url":"http://img3.terabitz.com/mls/NNRMLS/img/10/001/2257/2.jpg"}]}]

---------------------------------------------------------------------------------------------------
i able to get price ,

but i also want url so how i can get it pls help me.
pls change in my above code where it requires..

pls reply as soon as possible.