Closed sergejreznik closed 7 years ago
Hi, if I understood correctly, this format isn't supported at the moment. But, can you provide a example spreadsheet that could result in this?
Hi, like i wrote above I want a JSON-file, that looks like this:
{ "id": { "sub_id": { "key": "val" }, "sub_id_two": { "key": "val" } }, "id_two": { "sub_id": { "key": "val" }, "...": "..." } }
At the moment I can do only this one:
{"id": { "key": "val", "key": "val"}, "id": {"key":"val", "key","val"}}
.
Is this possible?
my application looks like this:
gsjson({ spreadsheetId: 'ID is hidden', hash: 'id' })
Thank you.
Oh, sorry. One Moment - just read your answer incorrectly.
Hi,
I want to reach a table like this.
I've got like several ID's.
Then inside of each ID I've got several sub_id which contains elements.
Hey there,
I implemented a feature for this (https://github.com/bassarisse/google-spreadsheet-to-json/commit/654accda49634adfe0947cfe9750894a906a5484). With the example you provided, I could generate the following JSON:
{
"type1": {
"id": "type1",
"sub_id": {
"elem1": "foo 1",
"elem2": "foo 2",
"elem3": "foo 3"
},
"sub_id_two": {
"elem1": "foo 1",
"elem2": "foo 2",
"elem3": "foo 3"
},
"sub_id_three": {
"elem1": "foo 1",
"elem2": "foo 2",
"elem3": "foo 3"
}
},
(...)
}
I'll publish a new version soon, hope it fits your needs.
Hi, is it possible to build the document a way that the json is nested more than one time? I mean to use multiple hashes.
Like:
{ "id": { "sub_id": { "key": "val }, "sub_id_two": { "key": "val } ... }
Thank you and best regards, Sergej