I have an AJAX code that sends data to the server and returns results including id, name, and quantity.
How can I extract and print only the quantity, id, or name? Thank you for your help!
<script type="text/javascript">
$("#bto_update_quantity").click(function (){
$.ajax({
url:"cart/update_quantity",
type:"get",
dataType:"text",
data : {
id : $('.frm_product_id_cart').text(),
name : $('.frm_product_name_cart').text(),
quantity : $('#frm_product_quantity_cart').val()
},
success : function()
{
$('#frm_product_quantity_cart').val()
}});
});
</script>