have my json response as
{"data":[
{
"percentage":94.3,
"population":53193
}]
}
I'm trying to insert the data to span is
My Javascript
$.post("<?php echo $baseUrl . '/population'; ?>", function(data) {
$('.percentage').text(parseFloat(data.percentage));
$('.population').text(parseInt(data.population));
}, 'JSON');
Im getting NaN How do i resolve this