title: Uncaught TypeError: Cannot use 'in' operator to search for 'length' in {array}
body: <p>This is the script I'm using.     </p>
  
  <pre><code>&lt;script&gt;
  var user_lat, user_lng;
  var map;
  var url = "./rest/network";
  function initMap() {
    map = new google.maps.Map(document.getElementById('map'), {
      center: {
        lat: 17,
        lng: 80
      },
      zoom: 5
    });
      $.post(url,function(data,successStatus){
          $.each(data, function(index, value) {
              new google.maps.Marker({
                position: value,
                draggable: false,
                map: map,
                title: "cab"
              });
          });
      });     
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The url returns <code>[{lat:12.74711089,lng:79.98483278},{lat:18.0,lng:80.0},{lat:19.0,lng:78.0}]</code></p>
  
  <p>Again when I use this code its working</p>
  
  <pre><code>&lt;script&gt;
  var user_lat, user_lng;
  var map;
  var url = "./rest/network";
  function initMap() {
    map = new google.maps.Map(document.getElementById('map'), {
      center: {
        lat: 17,
        lng: 80
      },
      zoom: 5
    });
      var data = [{lat:12.74711089,lng:79.98483278},
                  {lat:18.0,lng:80.0},
                  {lat:19.0,lng:78.0}];
      $.each(data, function(index, value) {
          new google.maps.Marker({
            position: value,
            draggable: false,
            map: map,
            title: "cab"
          });
      });
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>If the array format is the problem, then the second code also shouldn't work. But it is working. I'm not knowing the reason behind the problem. Is there any problem with the ajax call?</p>