I have an object .I want to append it to the Select tag using Jquery.I can able to add the first column of an object into Sucessfully.But I can't able to catch the second column
- var obj=[{Series1,10},
- {Series2,20},
- {Series3,30},
- {Series4,40},
- {Series5,50},
- {Series6,60},
- {Series7,70}]
I want to split into separate variables.
- function Load() {
- var cuisines =obj;
- var set = document.getElementById('ddllicence');
- for (var i = 0; i < cuisines.length; i++) {
- var opt = document.createElement('option');
- //Append the first row into the name
- opt.innerHTML = cuisines[i]; (Series1)
- //Append the Second row into the Value
- opt.value = cuisines[i]; (10)
- set.appendChild(opt);
-
- }
Please help me to solve my issue.