I have a php that delivers the following content
[{"Id":"50630","Operador":"","Id_cadastro":"61693"}]
The vue-resource only recognizes if I remove the []
My code is vue
this.$http.get('data.json').then(function(response) {
this.cervejarias = response.data.Id_cadastro;
}
In PHP I'm doing this:
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
$data[] = $row;
}
print json_encode($data);
Am I forgetting something?
This same json, I can read through the Angular.