Why is the xyz variable not updating even after JSON is coming from the php page ?
var xyz = '';
$.get("filteredRestaurant.php", {dineTypeIdString: checked}, function(data) {
var response = JSON.parse(data);
$.each(response, function(index, value) {
xyz += 'a '; // line 5
});
});
xyz += 'b';
$('.filteredRestBody').html(xyz);
Even after line 5, the xyz's value is b Anyone, please help me out
Thanks in advance