![Image of menu] (https://github.com/clarenceng/google_spreadsheet_tojson/blob/master/json.png)
Takes selected columns and turns it into a json file I made it, because my translations are managed by Google Sheets
KEY | ENGLISH | FRENCH |
---|---|---|
GLOBAL.1 | one | une |
GLOBAL.TWO.1 | two one | duex une |
GLOBAL.TWO.2 | one two | une duex |
OUTPUT when choosing KEY and FRENCH
{
"GLOBAL" : {
"1" : "une",
"TWO" : {
"1" : "duex une",
"2" : "une duex"
}
}
}
-
In a spreadsheet, open tools -> script editor
-
Go to file -> new -> html file
-
create two html files
-
name them json.html and output.html
-
add my markup to the corresponding files.
-
In code.gs, add the contents of to_json.js to the bottom.
You're done!
In your spreadsheet, there should now be a menu to open the app.
It only accepts 2 columns.
You can change getColumnData() if you need more.
It will remove the entry if there is no string