title: How to create object array in ext js4 and set values to it?
body: <p>I am working in extjs4 MVC. Where i am getting stuck at a point*<em>.Which is how to define object array in extjs4 and set values to it as well as retrieve values from that object.</em>*I am tried but not yet solved.
  Suppose I have Qusetion paper.Which displays some question with there options.I have got qustion with proper selected option.But I am not succeed to store it in proper models instance.I know how to store single record to particular model instance.But I dont know how to store repetative values to a particular model object.How I solve this probelm.</p>
  
  <p>1) here is my some contrller file code</p>
  
  <pre><code>temp:function()
      {
          var obj = Ext.create('Demo.model.Poll');
          for(var i=0;i&lt;4;i++)
          {
                  var inputs = document.getElementsByName(i); 
                  var radio = "";  
                  for (var j = 0; j &lt; inputs.length; j++) {
                      if (inputs[j].checked) {
                          name = inputs[j].name;
                          value  = inputs[j].value;
                          //console.log("questionId="+name +" value="+ value);
                          check.set('poll',name);
                          check.set('option',value);
                      }// End of if statment
                  }// End of inner for loop
            }//End of outer for loop
  
          //Here I am going to display values inside object  
          console.log("----------------------------------");
            for(var i=0;i&lt;4;i++)
            {
                console.log(i);
                console.log(check.get('poll'));
                console.log(check.get('option'));
            }
      //Is it possible to save object array to server side in single save method
      //  obj.save();
  
  }// End of temp function
  </code></pre>
  
  <p>2) And after running this code i got last set value to model.In firebug i got this result.
  for exampl.</p>
  
  <pre><code>3 
  England 
  
  3 
  England 
  
  3 
  England
  
  
  3 
  England 
  </code></pre>
  
  <p>please give me some suggestion</p>