go-gota / gota

Gota: DataFrames and data wrangling in Go (Golang)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seems there is not support for nested json dictionary

arvtiwar opened this issue · comments

I have a JSON list as below, trying to convert it to a data frame. seems there is no way to process "issues.totalCount"? Is it possible to flatten the issues object?

I am using "df := dataframe.ReadJSON(strings.NewReader(nodeJsonStr))" to read and create data frame.

Thanks for any suggestions

[
{
"id": "myid47",
"issues": {
"totalCount": 13,
"uniqueEntityCount": 13
},
"name": "namemyid47",
"gravity": "CRITICAL"
},
{
"id": "myid152",
"issues": {
"totalCount": 5,
"uniqueEntityCount": 5
},
"name": "namemyid152",
"gravity": "CRITICAL"
},
{
"id": "myid62",
"issues": {
"totalCount": 3,
"uniqueEntityCount": 3
},
"name": "namemyid62",
"gravity": "CRITICAL"
},
{
"id": "myid142",
"issues": {
"totalCount": 144,
"uniqueEntityCount": 144
},
"name": "namemyid142",
"gravity": "HIGH"
},
{
"id": "myid4",
"issues": {
"totalCount": 32,
"uniqueEntityCount": 32
},
"name": "namemyid4",
"gravity": "HIGH"
},
{
"id": "myid60",
"issues": {
"totalCount": 21,
"uniqueEntityCount": 21
},
"name": "namemyid60",
"gravity": "HIGH"
},
{
"id": "myid146",
"issues": {
"totalCount": 1527,
"uniqueEntityCount": 1527
},
"name": "namemyid146",
"gravity": "MEDIUM"
},
{
"id": "myid6",
"issues": {
"totalCount": 888,
"uniqueEntityCount": 888
},
"name": "namemyid6",
"gravity": "MEDIUM"
},
{
"id": "myid5",
"issues": {
"totalCount": 520,
"uniqueEntityCount": 520
},
"name": "namemyid5",
"gravity": "MEDIUM"
}
]