i have JSON data as follows
{"4":"Bangles","2":"Rings"}
I am trying to Iterate through the content to populate the Dropdown
$("#ProductProductTypeId").change(function(){
var product_type_id = $(this).val();
console.log(product_type_id);
$.ajax({
type: "get",
url: "/alankruti/admin/product_categories/get_category/"+product_type_id,
//data: country_id,
success:function(data){
console.log(data);
var options = '';
$.each(data, function (key,value) {
console.log(key);
console.log(value);
options += '<option value="'+key+'">'+value+'</option>';
console.log(key + " " +value)
});
}
});
});
Error:
