This JSON output is the result of an aggregated MongoDB request. I essentially need to parse the embedded JSON data to the following values " total'and '_id'.
{
'ok': 1.0,
'result': [
{
'total': 142250.0,
'_id': 'BC'
},
{
'total': 210.88999999999996,
'_id': 'USD'
},
{
'total': 1065600.0,
'_id': 'TK'
}
]
}
I tried 5 different methods to get what I needed from him, however I ran into problems using modules jsonand simplejson.
Ideally, the output would be something like this:
142250.0, BC
210.88999999999996, USD
1065600.0, TK
source
share