I am working in php codeigniter and I tried like this in my code.
var dataSource = $.ajax({
url: <?php echo $url=$this->BASE_URL."home/destination_place" ?>,
method: "POST",
data: { id : id,firstName:firstName },
dataType: "html"
});
This is my returning array but it is not getting in the data source field
[{"id":"1","firstName":"dubai"},{"id":"2","firstName":"munnar"},{"id":"3","firstName":"wayanad"},{"id":"4","firstName":"kovalam"}]
I hope somebody will help me to solve this. hopefully