JSFiddle - React, Tailwind, and code Playground

by chauhangs

HTML

<select id="down">
    <option value="">select</option>
</select>

JavaScript

var temp = {"1" : "string1","2" : "string2"};

var $select = $('#down'); 
 $select.find('option').remove();  
$.each(temp,function(key, value) 
{
    $select.append('<option value=' + key + '>' + value + '</option>');
});