File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable func-style */
2+ /* eslint-disable no-var */
23// Copyright 2020 Google LLC
34//
45// Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,8 +20,8 @@ module.exports = function main(
1920 // [START composer_transform_csv_to_json]
2021
2122 function transformCSVtoJSON ( line ) {
22- const values = line . split ( ',' ) ;
23- const properties = [
23+ var values = line . split ( ',' ) ;
24+ var properties = [
2425 'location' ,
2526 'average_temperature' ,
2627 'month' ,
@@ -30,13 +31,13 @@ module.exports = function main(
3031 ] ;
3132 const weatherInCity = { } ;
3233
33- for ( let count = 0 ; count < values . length ; count ++ ) {
34+ for ( var count = 0 ; count < values . length ; count ++ ) {
3435 if ( values [ count ] !== 'null' ) {
3536 weatherInCity [ properties [ count ] ] = values [ count ] ;
3637 }
3738 }
3839
39- const jsonString = JSON . stringify ( weatherInCity ) ;
40+ var jsonString = JSON . stringify ( weatherInCity ) ;
4041 return jsonString ;
4142 }
4243
You can’t perform that action at this time.
0 commit comments