-
Hi, thanks so much for making Dasel! I'm trying to use it to export JSON at different levels (heterogenous levels?) to CSV and am wondering if it can do what I'm looking for. I've looked a bunch here and in various blog posts but can't seem to find anything or figure it out. This is a sample of the structure I'm working with (an array of these objects pulled from GH's GraphQL API): [
{
"author" : {
"login" : "querty"
},
"number" : 4521,
"createdAt" : "2022-11-21T02:57:35Z",
"mergedAt" : "2022-12-05T02:16:18Z",
"mergedBy" : {
"login" : "querty"
},
"approvers" : {
"nodes" : [
{
"author" : {
"name" : "Bill Blass",
"login" : "bblass"
},
"state" : "APPROVED"
},
{
"author" : {
"name" : "Ricky Eckhart",
"login" : "wreck-hart"
},
"state" : "APPROVED"
}
]
},
"title" : "Does something really amazing and magical",
"repository" : {
"owner" : {
"login" : "orgo"
},
"name" : "my-my-my"
}
},
{
...
}
] What I'm trying to do is only pull out certain fields at different levels, then export them to CSV. What I'd like to end up with is something like the below, where
I'm able to print out one value, e.g., all values for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
This sounds like a good use-case for mapOf.
|
Beta Was this translation helpful? Give feedback.
This sounds like a good use-case for mapOf.