Open zestyhamburger opened 5 years ago
Hmm, the first column of each row is treated as the key for the whole row's contents. There are several ways you could export the data you desire by adjusting the format. In my experience, localization is best done with each row being localized so all the data on a given target is in the same area (basically the way you have it set up).
If you want your exported data to be grouped by language however, you can accomplish this a couple of ways:
The first option is a much faster and easier way to export the data you want, so I would recommend that approach if it works for you.
Yeah, I was also hoping to see a column-based objects instead of row-based, or at least an option to toggle between the two, but suggestion 1. above works as well. Thanks. Also, just a data point, but using the first column entry as the key for the row looks very messy sometimes, especially if the column entry is a sentence. I check the "Export Sheet Arrays" box because of this.
Yeah, I'm trying that and is not working for me.
I have my table like this:
KEY,STRING
test_key,test
test_key_2,test 2
the desired export format would be:
{
"test_key": "test",
"test_key_2": "test 2"
}
bur it still exports as:
{
"KEYS": "test_key_2",
"ENGLISH": "test 2"
}
And this is my config:
{
"exportType": "jsonFormat",
"exportFolderType": "default",
"exportFolder": "",
"exportSheets": "currentSheet",
"targetSheets": "{}",
"replaceExistingFiles": false,
"unwrapSingleRows": true,
"collapseSingleRows": false,
"ignoreEmptyCells": false,
"ignoreColumnsWithPrefix": false,
"minifyData": false,
"includeFirstColumn": false,
"ignorePrefix": "NOEX_",
"unwrapSheetsWithPrefix": false,
"unwrapPrefix": "US_",
"collapseSheetsWithPrefix": false,
"collapsePrefix": "CS_",
"nestedElements": true,
"forceArrayNest": false,
"forceArrayPrefixNest": "NA_",
"forceString": false,
"exportCellArray": false,
"exportSheetArray": false,
"exportValueArray": false,
"exportContentsAsArray": false,
"exportCellObject": true,
"emptyValueFormat": "string",
"nullValueFormat": "null",
"separatorChar": ",",
"forceArray": false,
"forceArrayPrefix": "KEYS",
"exportChildElements": false,
"exportBoolsAsInts": false,
"rootElement": "data",
"nameReplacementChar": "_",
"includeDeclaration": false,
"declarationVersion": "1.0",
"declarationEncoding": "none",
"declarationStandalone": "none",
"forceAttributes": false,
"attributePrefix": "ATT_",
"forceChildElements": false,
"childElementPrefix": "CE_",
"forceInnerText": false,
"innerTextPrefix": "IT_",
"rootNamespace": "",
"namespaces": []
}
Was wondering if there is currently implemented way to export JSON with the first column being the key and the second (and so on) column(s) being the value. The purpose of this would be for localization where the first column list the unique id of the text string and the subsequent columns are values in different languages.
For example: UID | EN | ES | FR item_name | NameInEnglish | NameInSpanish | NameInFrench item2_name | Name2InEnglish | Name2InSpanish | Name2InFrench item3_name | Name3InEnglish | Name3InSpanish | Name3InFrench item4_name | Name4InEnglish | Name4InSpanish | Name4InFrench item5_name | Name5InEnglish | Name5InSpanish | Name5InFrench item6_name | Name6InEnglish | Name6InSpanish | Name6InFrench
This would be exported as: { "EN": { "item_name": "NameInEnglish", "item2_name": Name2InEnglish", "item3_name": Name3InEnglish", "item4_name": Name4InEnglish", "item5_name": Name5InEnglish", "item6_name": Name6InEnglish" } "ES": { "item_name": "NameInSpanish", "item2_name": Name2InSpanish", "item3_name": Name3InSpanish", "item4_name": Name4InSpanish", "item5_name": Name5InSpanish", "item6_name": Name6InSpanish " } "FR": { "item_name": "NameInFrench", "item2_name": Name2InFrench", "item3_name": Name3InFrench", "item4_name": Name4InFrench", "item5_name": Name5InFrench", "item6_name": Name6InFrench" } }
As you as see it is much more maintainable this way and readable since there will be many more rows than columns.
@zestyhamburger I found a CSV > JSON solution here: https://csvjson.com/csv2json Just remember to check HASH and TRANSPOSE.
Here an example:
Was wondering if there is currently implemented way to export JSON with the first column being the key and the second (and so on) column(s) being the value. The purpose of this would be for localization where the first column list the unique id of the text string and the subsequent columns are values in different languages.
For example: UID | EN | ES | FR item_name | NameInEnglish | NameInSpanish | NameInFrench item2_name | Name2InEnglish | Name2InSpanish | Name2InFrench item3_name | Name3InEnglish | Name3InSpanish | Name3InFrench item4_name | Name4InEnglish | Name4InSpanish | Name4InFrench item5_name | Name5InEnglish | Name5InSpanish | Name5InFrench item6_name | Name6InEnglish | Name6InSpanish | Name6InFrench
This would be exported as: { "EN": { "item_name": "NameInEnglish", "item2_name": Name2InEnglish", "item3_name": Name3InEnglish", "item4_name": Name4InEnglish", "item5_name": Name5InEnglish", "item6_name": Name6InEnglish" } "ES": { "item_name": "NameInSpanish", "item2_name": Name2InSpanish", "item3_name": Name3InSpanish", "item4_name": Name4InSpanish", "item5_name": Name5InSpanish", "item6_name": Name6InSpanish " } "FR": { "item_name": "NameInFrench", "item2_name": Name2InFrench", "item3_name": Name3InFrench", "item4_name": Name4InFrench", "item5_name": Name5InFrench", "item6_name": Name6InFrench" } }
As you as see it is much more maintainable this way and readable since there will be many more rows than columns.