PDA

View Full Version : Data stores and arrays



emd
23 Jul 2011, 10:00 AM
I've tried searching for this but can't seem to find an answer. Following the tutorial at:
http://www.sencha.com/learn/taking-sencha-touch-apps-offline
I can see how you can take simple data offline.

But can Sencha Touch handle more complex data? eg. JSON that contains arrays?

Also, is it necessary to put JSON into a model or can the JSON be persisted without this?

The actual JSON I'm working on is attached below. Basically it's an array of products, which contains an array of sections, which contains an array of articles.


{
"products": [{
"product": "Product 1",
"data": [
{
"sectionTitle": "How to use",
"articles":
[
{
"title": "Use at home"
},
{
"title": "Use at work"
}
]
},
{
"sectionTitle": "Where to buy",
"articles":
[
{
"title": "In the UK"
},
{
"title": "In the US"
}
]
}
]
}]
}