title: Transform hard coded initialization values to CSV
body: <p>Using Python I wanted to extract data rows shown below to a csv file from  a bunch of javascript files which contain hardcoded data as shown below:</p>
  
  <pre>
  
  ....html code....
  
  hotels[0] = new hotelData();
  hotels[0].hotelName = "MANHATTAN";
  hotels[0].hotelPhone = "";
  hotels[0].hotelSalesPhone = "";
  hotels[0].hotelPhone = 'Phone: 888-350-6432<br />';
  hotels[0].hotelStreet = "787 11TH AVENUE";
  hotels[0].hotelCity = "NEW YORK";
  hotels[0].hotelState = "NY";
  hotels[0].hotelZip = "10019";
  hotels[0].hotelId = "51543";
  hotels[0].hotelLat = "40.7686";;
  hotels[0].hotelLong = "-73.992645";;
  
  
  hotels[1] = new hotelData();
  hotels[1].hotelName = "KOEPPEL";
  hotels[1].hotelPhone = "";
  hotels[1].hotelSalesPhone = "";
  hotels[1].hotelPhone = 'Phone: 718-721-9100<br />';
  hotels[1].hotelStreet = "57-01 NORTHERN BLVD.";
  hotels[1].hotelCity = "WOODSIDE";
  hotels[1].hotelState = "NY";
  hotels[1].hotelZip = "11377";
  hotels[1].hotelId = "51582";
  hotels[1].hotelLat = "40.75362";;
  hotels[1].hotelLong = "-73.90366";;
  
      var mykey = "AlvQ9gNhp7oNuvjhkalD4OWVs_9LvGHg0ZLG9cWwRdAUbsy-ZIW1N9uVSU0V4X-8";
                  var map = null;
                  var pins = null;
                  var i = null;
                  var boxes = new Array();
                  var currentBox = null;
  
                  var mapOptions = {
                  credentials: mykey,
                  enableSearchLogo: false,
                  showMapTypeSelector: false,
                  enableClickableLogo: false
                  }
  .....html code .....
  </pre>
  
  <p>Hence the required csv output would  be like rows of the above data:</p>
  
  <pre>
  MANHATTAN,,,Phone: 888-350-6432 ...
  KOEPPEL,,,Phone: 718-721-9100 ...
  </pre>
  
  <p>Should I use code generation tool to directly parse the above statements to get the data ?  Which is the most efficient Python method to transform such data contained in thousands of Javascript files into csv tabular format?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Ideally I would like the solution to parse the JavaScript statements as Python objects and then store it to CSV to gain maximum independence from ordering and formatting of the input script code</p>