0
I’m having trouble showing off 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)
, the JSON appears complete.
What am I doing wrong?
how is your json returning?
– adventistaam
http://viacep.com.br/ws/30626620/json/{ "cep": "30626-620", "patio": "Rua Joaquim Teixeira Dias", "complement": "", "neighborhood": "Cardoso (Barreiro)", "locality": "Belo Horizonte", "Uf": "MG", "unit": "", "ibge": "3106200", "Gia": ""
";}
– Mozelli