Ezequiel, the site was unavailable at the time of my reply, so I created a json.php file to test and pasted your json that you wrote in the comment on it. I removed the interrogations(??) from the middle of the json so as not to make an error. I called your function and turned it good.
Output example:
Planned Surveys
16524 2017-02-06
Type: Outlet Property Type: Residential
Follow the code used to test:
json.php
[{"id":"1","dataVistoriaAgenda":"2017-02-06","dataVistoria":"0000-00-00 00:00:00","endereco":"Rua São Rafael, 34","tipoImovel":"Residencial","comentarios":"","tipoVistoria":"Saída","status":"Pendente","codImovel":"16524"}]
index php.
<!DOCTYPE html>
<html>
<head>
<title>Teste Carrega Agendamento</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
function carregaAgendamento()
{
//var url = "http://prestoexpress.com.br/vistoria/json.php"; // Site indisponível no momento
var url='json.php'; // com json fake informado no comentário pra ver rodando
// Apenas removi umas "??" para não dar erro
$.getJSON(url, function(result)
{
console.log(result);
$.each(result, function(i, field)
{
var id = field.id;
var dataVistoriaAgenda = field.dataVistoriaAgenda;
var tipoImovel = field.tipoImovel;
var tipoVistoria = field.tipoVistoria;
var codImovel = field.codImovel;
$("#vistoria-agenda").append('<li><a href="#"><h2>' + codImovel + ' ' + dataVistoriaAgenda + '</h2><p>' +
' Tipo: ' + tipoVistoria + '<br>'+
' Tipo Imóvel: ' + tipoImovel + '</p></a></li>');
});
});
};
window.onload=carregaAgendamento;
</script>
</head>
<body>
<p>Vistorias Agendadas</p>
<ul id="vistoria-agenda" data-role="listview" data-inset="true">
</ul>
</body>
</html>
Ezekiel check if his return really has something, see: http://answall.com/a/175701/14262 the question is very similar, and the boy’s mistake was the return json
– MarceloBoni
@Marcelobonifazio is returning yes [{"id":"1","dataVistoriaAgenda":"2017-02-06","dataVistoria":"0000-00-00 00 00:00",""address":"Rua São Rafael, 34","typeImovel":"Residencial","comments":""","typeVistoria":"Output","status":"Pendente","typeImovel":"16524"}]
– Ezequiel Tavares
https://jsfiddle.net/k9n3jLd3/2/ apparently your code is ok
– MarceloBoni