I can not display uf
in the following situation:
$.post("<?php echo site_url('Welcome/viacep'); ?>",
{cep: cep},
function(dados){
alert(dados.uf);
},
'json'
);
But when I change the alert to alert(dados)
, JSON appears complete.
What am I doing wrong?