title: json not matching model
body: <p>In EXTJS i will use a model and store for my grid. Now is the problem that sometimes the json will not match the model. There will be less information then in my model. When this happens EXTJS will not show any data in the grid. So i looked for a fix and found this:</p>
  
  <pre><code>Ext.define('App.Reader', {
  extend: 'Ext.data.reader.Json',
  
  extractData: function(root) {
      var me = this,
          values  = [],
          records = [],
          Model   = me.model,
          i       = 0,
          length  = root.length,
          idProp  = me.getIdProperty(),
          node, id, record;
  
      if (!root.length &amp;&amp; Ext.isObject(root)) {
          root = [root];
          length = 1;
      }
  
      for (; i &lt; length; i++) {
          node   = root[i];
          values = me.extractValues(node);
          id     = me.getId(node);
  
          record = new Model(values, id, node);
          records.push(record);
  
          if (me.implicitIncludes) {
              me.readAssociated(record, node);
          }
  
      }
  
      return records;
  },
  
  extractValues: function(data) {
      var fields = this.getFields(),
          i      = 0,
          length = fields.length,
          output = {},
          field, value;
  
      for (; i &lt; length; i++) {
          field = fields[i];
          value = this.extractorFunctions[i](data);
  
          if(value === undefined)
          {
              Ext.iterate(fields, function(key, val) {
                  if (data[key] === undefined &amp; i==val) {
                      console.log( "Model field &lt;" + key.name + "&gt; does not exist in data/node.");
                      value = "INVALID OR MISSING FIELD NAME";
                      var p = 0;
                      for(var prop in data) {
                          if(p==i){
                              if(data.hasOwnProperty(prop))console.log("Instead of &lt;" + key.name + "&gt; we have &lt;" + prop + "&gt; with value &lt;" + data[prop]+ "&gt;");
                          }
                          p++;
                      }
                  }
              }, this);
          }
  
          output[field.name] = value;
      }
  
      return output;
  }
  
  });
  
  var myReader = new App.Reader({
  type:'json'
  });
  </code></pre>
  
  <p>i found this online. But when i use this with EXTJS 4.1.1 there is an error in ext-all: TypeError: j is undefined.</p>
  
  <p>Where should i look for the fix for this?</p>