I have an Object called (rowdata) and in that object there are two concatenated values separated by "\n", I want to display the two values in listbox. One value one row, how to break the two concatenated values and display to listbox.
code:
var myArray = [[rowdata]]; // assuming rowdata have two value separated by \n in localstorage
function populate(){
for(i=0;i<myArray.length;i++){
var select = document.getElementById("test"); //ID of the listboxt
select.options[select.options.length] = new Option(myArray[i][0], myArray[i][1]);
}
}
Is there a way to do that? thank you