Skip to content

Added nested JSON object functionality to group directive#4

Open
ginogervasio wants to merge 1 commit intomkasa:masterfrom
ginogervasio:master
Open

Added nested JSON object functionality to group directive#4
ginogervasio wants to merge 1 commit intomkasa:masterfrom
ginogervasio:master

Conversation

@ginogervasio
Copy link

Hi @mkasa - Really awesome code. I just wanted to show you something I had to do for my side project in case you were open to the suggestion/found it useful. I basically needed to make a few changes to your select_json function to do two things - 1. Return an empty string instead of raising an error to make the schema a bit more lenient and 2. Allow the group directive to handle a nested JSON object so that:

$ cat test.json
{"name": "John", "personal_info": {"age": 30, "sex": "male"} }
$ cat test.ts
table { "name"; group "personal_info" { "age", "sex"; } }
$ json2xlsx test.ts -j test.json -o output.xlsx

Looking forward to hearing from you about this.

@AdmAlexus
Copy link

Raise it's PR. Very much needed functionality
@mkasa

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

Successfully merging this pull request may close these issues.

2 participants