选择值不显示

i have a webpage that gets data from a local database. i can retrieve the data to be displayed but for some reason a certain value (value of '#item_name') does not display. it's supposed to be the text inside a select dropdown with an id of item_name. am i missing something? here is my code:

$.ajax({
    url: '/get_items',
    method: 'POST',
    data: { item_id: item_id },
    success: function (response) {
        alert(JSON.stringify(response.result[0].name));
        $('#hidden_item_item_id').val(response.result[0].id);
        $('#item_name').val(response.result[0].name);
        $('#item_remarks').val(response.result[0].remarks);
        $('#updateItemsModal').modal('show');
    }
});

You don't need to do JSON.stringify, just add dataType : 'json' in ajax request.

$.ajax({
    url: '/get_items',
    method: 'POST',
    data: { item_id: item_id },
    dataType: 'json',
    success: function (response) {
        alert(response.result[0].name);
        $('#hidden_item_item_id').val(response.result[0].id);
        $('#item_name').val(response.result[0].name);
        $('#item_remarks').val(response.result[0].remarks);
        $('#updateItemsModal').modal('show');
    }
});

Please try

Try this,

$('#item_name').append($("<option />").val(response.result[0].name).text(response.result[0].name));

Hope this helps!