Synthoid / ExportSheetData

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

How to get plain array? #67

Closed OnkelTem closed 6 years ago

OnkelTem commented 6 years ago

Hi!

Given a sheet like this:

England
Scotland
United Kingdom
Northern Ireland
France
Wales
...

I want to get just a simple json like this:

[
  "England",
  "Scotland",
  "United Kingdom",
  "Northern Ireland",
  "France",
  "Wales",
  ...
]

I have "Export contents as array" switched on but this is what this addon actually returns:

[
  {
    "England": "Scotland"
  },
  {
    "England": "United Kingdom"
  },
  {
    "England": "Northern Ireland"
  },
  {
    "England": "France"
  },
  {
    "England": "Wales"
  },
  ...
]

How to configure it to not doing what it's not asked?

Synthoid commented 6 years ago

Hmm, I think you want to just enable the "Export value arrays" option. That should do what you want.

OnkelTem commented 6 years ago

Thank you very much @Synthoid, it worked!