title: Sencha Touch/ExtJS: how do i dynamically define a model?
body: <p>I would like to dynamically define models to handle data from a data store.
  I have a web service that returns different JSON structures (eg. <code>field_1:&quot;val1&quot;</code>  or <code>field_1:&quot;val1 field_2:&quot;val2&quot;</code> or <code>field_1:&quot;val1&quot;...field_n:&quot;valn&quot;</code>). I've seen that for using</p>
  <pre><code>Ext.regStore(&quot;UserStuffStore&quot;,{
          model: &quot;myModel&quot;,
          proxy: {
              type: 'ajax',
              url: rl,
              headers: {
                  'Accept' : 'application/json'
              },
              reader: {
                  type: 'json'
              }
          },
          autoLoad: true
      });
  </code></pre>
  <p>I need to specify a model. In this case, I need to see data structures before defining the model. How can I solve it?</p>
  <p>Surely I can make two different calls to the web service (the first to get the data structures, the other to get data), is there another way?</p>