I am having trouble parsing the response from my app. Here is the call with my best guess at how to deal with the json coming back...
$.ajax({
url: 'houses.json',
method: 'GET',
datatype: 'json',
success: function(data){
$.each(data, function(h){
$(h).each(function(){
console.log(h.address);
});
});
Here is the response I am getting back from the server:
[{"house":{"address":"7 view st dunedin nz","lng":170.500908,"id":3,"lat":-45.875059}},{"house":{"address":"26 brown st dunedin nz","lng":170.496236,"lat":-45.875834,}}]
the best I can get is having it say undefined. Once. I am trying to set up a loop for creating markers for a google map. I could use another pair of eyes. Anyone? Thanks.