my problem with json_encode() ?
result why are in json_encode() next to each other?

php:

    function search_hotel(){
            $search_term = $this->input->post('search_hotel');
            $query = $this->db->order_by("id", "desc")->like('name', $search_term)->get('hotel_submits');
            $data = array();
            foreach ($query->result() as $row)
            {
               $data[] = $row->name;
            }
            echo json_encode(array('name' => $data));
    // echo: {"name":["333333","\u0633\u0644","\u0633\u0644\u0627\u0633\u06cc","\u0633\u0644\u0627\u0633\u0633","\u0633\u0644\u0627\u0645"]}
        }

js:

    $('#hotel').keyup(function () {
        var dataObj = $(this).closest('form').serialize();
        $.ajax({
            type: "POST",
            url: 'http://localhost/Siran-mehdi/admin/tour/search_hotel',
            data: dataObj,
            cache: false,
            dataType: 'json',
            success: function (data) {
                $(".list_name").toggle().html('');
                
                $.each(data.name, function(a,b){
                    $(".list_name").append('<p>' + data.name + '</p>');
                });            
            },
            "error": function (x, y, z) {
                // callback to run if an error occurs
                alert("An error has occured:\n" + x + "\n" + y + "\n" + z);
            }
            });
        });

this is search result that have problem:

http://i.stack.imgur.com/mObpn.gif

I hope you understand my mean.
my problem with json_encode() ?
===

result why are in json_encode() next to each other?

php:

    function search_hotel(){
            $search_term = $this->input->post('search_hotel');
            $query = $this->db->order_by("id", "desc")->like('name', $search_term)->get('hotel_submits');
            $data = array();
            foreach ($query->result() as $row)
            {
               $data[] = $row->name;
            }
            echo json_encode(array('name' => $data));
    // echo: {"name":["333333","\u0633\u0644","\u0633\u0644\u0627\u0633\u06cc","\u0633\u0644\u0627\u0633\u0633","\u0633\u0644\u0627\u0645"]}
        }

js:

    $('#hotel').keyup(function () {
        var dataObj = $(this).closest('form').serialize();
        $.ajax({
            type: "POST",
            url: 'http://localhost/Siran-mehdi/admin/tour/search_hotel',
            data: dataObj,
            cache: false,
            dataType: 'json',
            success: function (data) {
                $(".list_name").toggle().html('');
                
                $.each(data.name, function(a,b){
                    $(".list_name").append('<p>' + data.name + '</p>');
                });            
            },
            "error": function (x, y, z) {
                // callback to run if an error occurs
                alert("An error has occured:\n" + x + "\n" + y + "\n" + z);
            }
            });
        });

this is search result that have problem:

http://i.stack.imgur.com/mObpn.gif

I hope you understand my mean.