title: JSON nested array for Geolocation
body: <p>I am trying to take a JSON feed and use the information to plot shuttle buses on google maps.  I can't seem to figure out how to remove the header.  Or maybe I don't even have to and I'm missing something.  The JSON feed looks like this:</p>
  
  <pre><code>{"header":{"gtfs_realtime_version":"1","incrementality":0,"timestamp":1473346401},"entity":[{"id":"1","is_deleted":false,"trip_update":null,"vehicle":{"trip":{"trip_id":"2351087","start_time":"10:30:00","start_date":"20160908","schedule_relationship":0,"route_id":"30"},"position":{"latitude":41.7992477,"longitude":-71.44529,"bearing":360.0,"odometer":0.0,"speed":0.0},"current_stop_sequence":0,"current_status":2,"timestamp":1473346346,"congestion_level":0,"stop_id":"12815","vehicle":{"id":"1604","label":"1604","license_plate":" "}},"alert":null},{"id":"2","is_deleted":false,"trip_update":null,
  </code></pre>
  
  <p>The above goes on for about 20 more shuttles.</p>
  
  <p>Below is what I have for the function.  I get "Uncaught TypeError: Cannot read property 'header' of undefined".  I can't figure out how to get rid of the header although there could be more errors.  I'm not much of a programmer, I'm learning as I go. Any help is very much appreciated.</p>
  
  <pre><code>placeVehicles1();
  setInterval(placeVehicles1, 15000);
  
  function placeVehicles1() {
  
  $.getJSON('JSON URL', function(datah){  
  $.each(datah, function(key){
  
  var hillArray =[key] ;
  
  hillArray[0] =datah['entity']['vehicle'][key]['190'];
  hillArray[1] =datah['entity']['vehicle'][key]['191'];
  hillArray[2] =datah['entity']['vehicle'][key]['192'];
  
      var number = hillArray[key]; 
      for(h=0; h&lt;101; h++){
      {
              var Latitudeh = datah['position'][key]['latitude'];
              var Longitudeh = datah['position'][key]['logitude'];
              var Timeh = datah['entity'][key].timestamp;
              var Routeh = datah[key].Route_id;
              var Vehicleh = datah[key].Vehicle;
              //markersArray.length=0;
              markersArray.push(datah);
  
              //Set Lat and Long of each Bus
  
              var imageh = 'GoldBus.png';
              var myLatlngh = new google.maps.LatLng(parseFloat(datah['position'][key]['latitude']),parseFloat(datah['position'][key]['logitude']));
  if (h=101){
  marker=null;
  }else{}
              var marker = new google.maps.Marker({
                  position: myLatlngh,
                  title: 'Shuttle',
                  map: map,
                  icon: imageh
              });
  
          google.maps.event.addListener(marker, 'click', function() {
                infowindow.open(map,marker);
              });
          //}}
          // Define Content to Show in popup
              var mycontenth = "&lt;div class='infowin'&gt;Time:&lt;h3&gt;" + Timeh + "&lt;/h3&gt;" + "Route:&lt;h3&gt;" + Routeh + "&lt;/h3&gt;" + "Vehicle:&lt;h3&gt;" + Vehicleh + "&lt;/h3&gt;&lt;/div&gt;";
              var infowindowh = new google.maps.InfoWindow({
                  content: mycontenth         
  });
  </code></pre>