Help with the right commands #394
-
First of all, wow is this fast!!! THANK YOU!! I am looking to take each array in the JSON example below and export it to .csv. e.g. Applications, Person, Interests, Majors, etc. Using person.email as an added key to each .csv row. I have tried my best at reading the docs and comments. I am a bit stuck. When using the command row1: column1 column2 What I am looking for of course is: When I try to move down to Interests for example: All help is appreciated!! Here is one complete record of the JSON file for refernce
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Part of the issue here is that you are using If we just do
If we adjust the selector we can get closer:
Could I have an example CSV output for the given file above so I can give some more accurate help? |
Beta Was this translation helpful? Give feedback.
Finally, I got it. Thank you for your patience, and quick response. You did indeed answer everything I needed. To get ApplicationDetial all I needed was:
dasel -f $json -w csv 'all().ApplicationDetail.mapOf(ApplicationID,ApplicationID)' | awk 'NR==1 || NR%2==0'
You sir ar the BEST!!