How do I assign response data to a variable?
$.ajax({
type : "POST",
async: true,
url : "<?php echo base_url(); ?>" + "Graphs/get_graphs",
dataType: 'json',
data :{hotel_name_realm:$("#hotel_names").val()},
success : function(res){
obj = JSON.parse(res);
console.log(obj.upload);
console.log(obj.download);
series: [{
name: 'Download',
data: [
(obj.Download) // Assign the obj.download data here
]
}
}