I have a google map sample with multiple polygons. I changed the new google.maps.Polygon function to polyline as
     new google.maps.Polyline({
                paths: arr,
                strokeColor: '#FF0000',
                strokeOpacity: 0.8,
                strokeWeight: 2,
                fillColor: '#FF0000',
                fillOpacity: 0.35
            })
But it does not drawing the lines. Fiddle here. Also how to set object name to infowindow content. I tried with
 var infowindow = new google.maps.InfoWindow({
            content: i
        });
				
                        
A google.maps.Polyline doesn't have a
pathsproperty. Change:To:
updated fiddle
code snippet: