google-spreadsheet-to-json
google-spreadsheet-to-json copied to clipboard
Ignore Column but include Hash
I would like to Hash my objects using an "id" column, but I don't want this "id" column to be part of the json object.
E.g:
Google Sheet: [ID, Name, Type, Image] [63, "My Name", "My Type", "MyImage.png"]
gsjson sheetId data.json -b -c id --ignore-col 1
results in:
{
"undefined": {
"name": "My Name",
"type": "My Type",
"image": "My Image"
}
}
Is it possible to still retrieve the hash with the ignore column? which would result in:
{
"63": {
"name": "My Name",
"type": "My Type",
"image": "My Image"
}
}
Thanks for noticing this.
I'm not sure if we should:
- add a new option to avoid including the hashed field in the object; or
- allow an ignored column to be used as a hash.
The second seem more obvious to me, what do you think?
Yes the second option "allow an ignored column to be used as a hash." seems more intuitive to me.