PDA

View Full Version : It returns value from Json.



Perfect Lion
4 Oct 2007, 6:03 PM
Hi again.

I am wanting to recoup the values of one link I contend content json:

ex:



var ds = new Ext.data.Store({
// load using HTTP
proxy: new Ext.data.HttpProxy({
url: 'index/json/'
}),

reader: new Ext.data.JsonReader({
root: "content", // The property which contains an Array of row objects
id: "id"
},[
{name: 'contentx'}
])
});
ds.load();


E would like to recoup of the following form:



ds.data['contentx'];


More vi q is not functioning of this form. How I make to recoup this value?

My Json is thus:



var json = {content: [{contentx:"value1"}, {contentx:"value2"}]}

Perfect Lion
5 Oct 2007, 3:27 AM
*UP*