PDA

View Full Version : How to load JsonStore object from an existing JSON object/array



guyza
16 Sep 2010, 2:00 PM
I'm hoping this is a simple answer and I'm just over-looking something in the documentation. Is there a way to take an existing JSON object I have stored as a variable:

IE. var myJson = {data:[{object1},{object2},{object3}]};

and create a JsonStore object from this, granted I specify the fields?

troseberry
16 Sep 2010, 2:19 PM
Have you tried specifying the
data : myJSon in your store configuration

guyza
16 Sep 2010, 2:50 PM
Ah, thanks for the nearly immediate answer. Much appreciated!

I knew it was probably something simple. I had configured as suggested but the key was using the loadData() method on my ComboBox object. Thanks again!