Hi everyone, I’m new to JS and JSON. What I want to do is get a list of country names from a URL then load that list as the options for Select2. This is the url that I used to get country names. https://corona.lmao.ninja/countries. I did some parsing and formatting to create the following array to be used for Select2. https://pastebin.pl/view/caede535. However when I do
$(".js-example-data-array").select2({
data: ARRAY
})
The country names don’t show up as the options for Select2. I’m not sure what I did wrong. Can someone help me fix this?