在div中添加响应ajax

I am trying to add a response in json format to a column but I get the following error: "Uncaught TypeError: response[i].name.appendTo is not a function".

function allUsers(){
        $(".error").remove();
        $("#tabla").remove();
        $.ajax({
            type: "GET",
            url: "mylocalhost/public/api/user",
            contentType: "application/json",    
            dataType:'json',

             beforeSend: function(request) {
                    request.setRequestHeader("Authorization", localStorage.getItem("token"));
                },
            success: function(response){
                console.log(response);




for (i = 0; i < response.length; i++) {

                    $('<div class="prueba"/><br>')+(response[i].name).appendTo('#filaNombre');

                    ...

Try changing this line:

$('<div class="prueba"/><br>')+(response[i].name).appendTo('#filaNombre');

to this:

$('<div class="prueba"><br>' + response[i].name + '</div>').appendTo('#filaNombre');

Use below code to append name using forEach

response.forEach((item)=> {
    $('#filaNombre').append(`<div class="prueba">${item.name}</div>`);
});

allUsers() is used to populate JSON response

function allUsers() {
    $(".error").remove();
    $("#tabla").remove();
    $.ajax({
        type: "GET",
        url: "mylocalhost/public/api/user",
        contentType: "application/json",    
        dataType:'json',

         beforeSend: function (request) {
                request.setRequestHeader("Authorization", localStorage.getItem("token"));
            },
        success: function (response) {
          if (response) {
            response.forEach((item)=> {
                $('#filaNombre').append(`<div class="prueba">${item.name}</div>`);
            });
          } else {
            $('#filaNombre').append(`<div class="prueba">No User Found</div>`);
          }
        }
    });
}