dealing with a nasty bit of JSON. I am using json.load to write into a file and have it stored is a dict type , printed below. In python, how would I go about getting a list of just the "dimension" values starting after ""false_value"" (as they first dimension value is not actually a value I want).
I tried kind of a hacky way, but feel like someone may have a perspective on how to do this in a more eloquent fashion.
Goal, make list of all the dimension values (outside the first) such as ( '100', '121' ...)
{
"reports": [
{
"columnHeader": {
"dimensions": [
"ga:clientId"
],
"metricHeader": {
"metricHeaderEntries": [
{
"name": "blah",
"type": "INTEGER"
}
]
}
},
"data": {
"rows": [
{
"dimensions": [
"false_value"
],
"metrics": [
{
"values": [
"2"
]
}
]
},
{
"dimensions": [
"100"
],
"metrics": [
{
"values": [
"2"
]
}
]
},
{
"dimensions": [
"121"
],
"metrics": [
{
"values": [
"1"
]
}
]
},
{
"dimensions": [
"1212"
],
"metrics": [
{
"values": [
"1"
]
}
]
}, ],
"totals": [
{
"values": [
"10497"
]
}
],
"rowCount": 9028,
"minimums": [
{
"values": [
"0"
]
}
],
"maximums": [
{
"values": [
"9"
]
}
],
"isDataGolden": true
},
"nextPageToken": "1000"
}
]
}