I have this ajax request code
$("#input_form").on("your change event",function(e){
if(changeTimer !== false) clearTimeout(changeTimer);
changeTimer = setTimeout(function(){
$.ajax({
type: 'POST',
url: 'exchanger',
data: $('#depo').serialize(),
beforeSend: function() {
$("#result").addClass('deposit-input-loading');
}
}).done(function(t) {
data = $.parseJSON(t);
setTimeout(function() {
$("#result").removeClass('deposit-input-loading');
$("#ex_limit").html('min: '+data.value);
$("#received_amount").val(data.receive_amount);
}, 1000);
})
changeTimer = false;
},50);
});
But error in after done function in ajax request. my PHP file code was like this
$rate = $API->getRate($send, $received, $amount);
$limits = $API->getLimits($send, $received);
echo json_encode($rate);
echo json_encode($limits);
the echo json_encode show different array How to get the response from different json_encode and show in ajax request?