I have this dynamic list of countries:
<div>Argentina, Brazil, Colombia, Ecuador</div>
I want to add the countries as options to a combobox dropdown using the following format:
options: [
{ data: 'Argentina' },
{ data: 'Brazil' },
{ data: 'Colombia' },
{ data: 'Ecuador' }
];
I have figured out how to split/join the list items to show the desired array, but not how to populate the dropdown.
https://jsfiddle.net/rj025tkb/
Any help would be appreciated as I’ve been looking for a solutions for days now. Preferably without using JSON.