Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: '<?= base_url('login/Pesquisar'); ?>',
- type: 'POST',
- data: $("#formulario_pesquisa").serialize(),
- dataType: 'json',
- success: function(data){
- alert(JSON.stringify(data))
- alert(Object.keys(data));
- alert(data.email);
- }
- });
- alert(JSON.stringify(data)) >>> {"cnpj ":"68.207.717/0001-42","email ":"teste.teste@email.com","Logado":true)
- alert(Object.keys(data)); >> cnpj ,email ,Logado
- alert(data.email); >> undefined
- var json = {"email ":"teste.teste@email.com"};
- console.log(json.email) <= undefined
- var json = {"email":"teste.teste@email.com"};
- console.log(json.email) <= teste.teste@email.com
Add Comment
Please, Sign In to add comment