Open sankari123 opened 8 years ago
Hi @sankari123 ,
Consider using map()
method to convert each item of venue_array
to an object with required properties:
venue_array = venue_array.map(function(e) {
var result = {};
result['text'] = e[0]; // or e[1]
result['value'] = e[1]; // or e[0]
return result;
});
Thanks for yr reply. I tried your code. But I get this msg. [object Object],[object Object],[object Object],[object Object]
I have an array which is created at run time. I want to use this array as the list.
venue_array=(["NGS","NGS"],["VMl","VM"],["KGS","KGS"],["BVB","BVB"]);
var config = { title: "Select a Venue", items: venue_array, selectedValue: "NGS", doneButtonLabel: "Done", cancelButtonLabel: "Cancel" };