How to append json array response to the bootstrap table

I have question regarding on my codes, I already have a result on my multiple array json response, The only problem is to append the result on the table.

On my response I want to append select_order_details to the table, how to use foreach to show all result and append the result to the table. 

My Html:

<table class="table table-striped table-bordered" style="width:100%;">
<thead>
    <tr font-size: 14px; ">
        <th scope="col">Menu Image</th>
        <th scope="col">Menu Name</th>
        <th scope="col">Quantity</th>
        <th scope="col">Subtotal</th>
    </tr>
</thead>
<tbody style=" font-size:14px;">
    <tr>
        <td></td>
    </tr>
</tbody>

My Ajax Function:

    $('button#gather_customer_order').on('click',function()
  {
      var order_id = $(this).attr('data-order-id');
      var customer_id = $(this).attr('data-customer-id');
  $.ajax({
      url:'/customer_detail_ordering_logic',
      type:'GET',
      data:{order_id:order_id,customer_id:customer_id},
      success:function(response){

          var response_customer_id = response[0].customer_details_id[0].customer_id;
          var response_order_id = response[0].customer_details_id[0].order_id;

            $.ajax({
                url:'/fetch_detail_order_monitor',
                type:'GET',
                data:{response_order_id:response_order_id,response_customer_id:response_customer_id},
                success:function(res){


                   console.log(res);



                }
            })

      }
  })

});


#jquery #ajax #laravel

4 Likes55.60 GEEK