This JSON output is from a MongoDB aggregate query. I essentially need to parse the nested data JSON down to the following to the \'total\' and \'_id\'
total\'
\'_id\'
This should do.
import json def parse_json(your_json): to_dict = json.loads(your_json) for item in to_dict['results']: print item['total']