I am working with this piece of code, where I am trying to iterate through an array and create a select element. Values is the array, out of which the options of the select element would be created.
I am using toggleLoad function to use the json response and create the table rows which I am trying to generate dynamically. Once I am into the original response, I would have to loop through the values json array to create the options for the select element.
When I use run the webpage, this is the output
**<tr><td>name1</td><td><select>undefined</select></td></tr>
<tr><td>name2</td><td><select>undefined</select></td></tr>*
Ext.each is generally used for searching for a particular value. If the passed in function returns false, the iteration stops and Ext.each returns the index of the last value. In your case you will need to just iterate over the array.