Question

I have a complex data structure and would like to have it modeled. But I would like to avoid creating the many sub-models that the data has, as they have no independent existence outside the scope of this data-structure

my data structure:

[
{
    "name": "General",
    "contexts": [
        {
            "name": "User Profile",
            "settings": [
                {
                    "valuesList": [
                        {
                            "name": "Name1",
                            "key": "key1"
                        },
                        ....
                    ],
                    "required": true
                },
                ........
            ],
         ......
    ]
  }
]

Can this be modeled in a single Ext.data.Model?

Thanks!

Was it helpful?

Solution

Seemingly, single model implementation not possible. You should refer these resources.

Extjs reading complex JSON data into store

One-to-many relationship between two models

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top