How do I use .JSON file to place multiple markers on a map in googlemap api

When I call the file in localhost only one out the expected four markers are placed.
Here is the js.
function initMap() {
var myprop={
center:new google.maps.LatLng(52.3967, -0.7302),
zoom: 7,
mapTypeId: ‘roadmap’
};
$.getJSON(‘locations.json’,function(data){
var obj= data;
for(i = 0; i < obj.length; i++) {
var pos = obj[i];
var iconBase = ‘https://maps.google.com/mapfiles/kml/shapes/’;
var latlng = new google.maps.LatLng(pos.lat, pos.lng);
var map = new google.maps.Map(document.getElementById(‘googlemap’),myprop);
var marker = new google.maps.Marker({
position: latlng,
icon:iconBase + ‘flag_maps.png’,
map:map,
title:pos.name
});
}
});
}

and here is the .JSON
[
{
“name”:“Bella Sicilia”,
“lat”:“51.9965”,
“lng”:"-0.7698",
“information”:“Italian”
},
{
“name”:“The Exotic Dining”,
“lat”:“52.43526”,
“lng”:"-0.7348",
“information”:" Indian"
},
{
“name”:“The Raj”,
“lat”:“52,657”,
“lng”:"-0.7128",
“information”:“Indian”
},
{
“name”:“Kino Lounge”,
“lat”:“52.6194”,
“lng”:"-0.6987",
“information”:“British”
}
]

Just a guess, it sounds like a closure problem. Try the following:

change:

for(i = 0; i < obj.length; i++) {

to:

for(let i = 0; i < obj.length; i++) {

Thanks. But that doesn’t seem to solve the problem.