Skip to content

Commit

Permalink
Updated wins app script to add spacing and line breaks to wins json f…
Browse files Browse the repository at this point in the history
…eed (hackforla#6205)

* changed JSON.stringify's spacer parameter to 5 to cause indentation between items and line breaks inbetwen arrays

* added to JSON.strinify() to line 68 to add spacing to _wins-data.json
  • Loading branch information
Jung-GunSong authored Feb 7, 2024
1 parent a944be4 commit efdecd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google-apps-scripts/wins-form-responses/Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function main() {
*/

// Create an array of objects (key-value pair) for _wins-data.json
const cleanedAndFormattedKeyValueData = JSON.stringify(sortedKeyValueData);
const cleanedAndFormattedKeyValueData = JSON.stringify(sortedKeyValueData, null, 5);
const encodedKeyValueData = Utilities.base64Encode(`${cleanedAndFormattedKeyValueData}`, Utilities.Charset.UTF_8);

// Retrieves latest sha of the _wins data file, which is needed for edits later
Expand Down

0 comments on commit efdecd1

Please sign in to comment.