Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Column but include Hash #13

Open
cfoulston opened this issue May 9, 2017 · 2 comments
Open

Ignore Column but include Hash #13

cfoulston opened this issue May 9, 2017 · 2 comments

Comments

@cfoulston
Copy link

cfoulston commented May 9, 2017

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"
    }
}
@bassarisse
Copy link
Owner

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?

@cfoulston
Copy link
Author

Yes the second option "allow an ignored column to be used as a hash." seems more intuitive to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants