Im trying to populate a dropdown menu with the data returned from database. my HTML is:
<select class="Input"></select>
Once I query my db, Im trying to append the data to the drop down.
$(".Input").append(data[0].abc);
Here "data[0].abc" refers to the first value of the array. abc is the field name of the value being returned. In case of more than one values for that particular field name, I plan to have a for loop which will loop through the entire array and append each value and add it to the drop down. I get the values but cant seem to add them to the drop down. Please correct me if my thought process is wrong. Can someone point me in the right direction? Thank you.