In a Get using PHP I'm making the request of 2 columns this way:
<?php
include 'conexao.php';
header('Content-Type: text/html; charset=UTF-8');
//Converte para UTF8 os resultados da query
mysql_set_charset('UTF8');
//Retorna resultado query idRegistro e updateatRegistro
$sql = "SELECT idRegistro,updateatRegistro FROM jump";
$resultado = mysql_query($sql) or die ("Erro: ".mysql_error());
// Crinha variável linha do tipo array
$linha = array();
while($r = mysql_fetch_assoc($resultado))
{
$linha [] = $r;
}
echo json_encode($linha);
mysql_close();
?>
And I'm trying to get the values. But I noticed that in responseData, I'm getting a response with 2 layers of arrays and 1 dictionary:
this way:
1º Array |2º Array| Dicionario
[0] = [0] = idRegistro: 1;
[1] = updateAt: 2015/02/18 19:55:42;
When I try to extract the data from the first layer of the array, the return should be another array, but it is being recognized as a dictionary. I think it's due to Json's coding.
I believe I should query these columns in some other way. Could anyone suggest a better way?