data insertion in 2D array in jquery -


i want insert data in array through jquery below:

means @ first time insert values on first position , second time insert values on second postion (i.e not insert values @ time on both positions)

    var custarr = new array();     custarr.push(["structure", "select parent"]);     custarr.push(["a", ""]);     custarr.push(["b", ""]);      var sel = $('<select>').appendto('body');      (var = 0; < custarr.length; i++)      {        custarr.push("", sel.append($("<option>").attr('value', "some values");     } 

expected result is:

custarr.push(["structure", sel.append($("<option>").attr('value', "some values")]); 

i cannot insert them both problem firstly in first loop. can insert structure values , in second loop need insert dropdown in front of structure values.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -