I have a json-formatted dataset that I want to incorporate into my select options.
Here is the data:
{
"timezones":
{
"country": "Africa",
"tz": "Africa/Abidjan"
},
{
"country": "America",
"tz": "America/Anguilla"
}
}
Below is the current select menu:
<select>
<optgroup label="Africa">
<option value="Africa/Abidjan">Adak</option>
</optgroup>
<optgroup label="America">
<option value="America/Adak">Anguilla</option>
</optgroup>
</select>
Is there a way to dynamically populate the select menu with the json data provided, without using jQuery?