Synthoid / ExportSheetData

Add-on for Google Sheets that allows data to be exported as JSON or XML.
MIT License
237 stars 46 forks source link

Cannot use Nested Elements and Export Sheet Arrays #71

Closed lm913 closed 6 years ago

lm913 commented 6 years ago

Example:

item1 {item2}subItem1 {item3}subItem1
value1 value1 value1
value2 value2 value2
value3 value3 value3

when Nested Elements and Export Sheet Arrays are set the JSON output is an empty array []

No other options within the add-on are activated.

Synthoid commented 6 years ago

For Nested Elements to function with arrays, fields must start with {#SHEET}{#ROW}. Take a look at the wiki page for Nested Elements (specifically the "Exporting Nested Elements and Sheet Arrays at the Same Time" section) for more info on how to format your keys. There is also an example spreadsheet with an example of how nested arrays should be formatted.

Nested Elements are a little tricky to get the hang of. Once you do, all kinds of data organization opens up to you though!

lm913 commented 6 years ago

That's not intuitive but I get it, thanks!

Synthoid commented 6 years ago

Haha, yeah. Nested Elements are not the most intuitive things to learn due to the complexity that they have to support. I should probably put some more intense examples together to show the true power of NE features.

You can also just preface the sheet your array is on with "NA_" (or whatever your Nested Array prefix is) as short hand for starting each key with {#SHEET}{#ROW}.

Anyway, marking this ticket as resolved.