Convert json to python list
Question: I'm new to JSON and trying to save the results of the following json response
into lists, in order to make some stats.Specifically, i'd like to save the
'results'.

    
    
    {u'draws':
     {u'draw':
     [{u'drawTime': u'22-02-2016T09:00:00', u'drawNo': 542977, u'results': [72, 47, 10, 48, 65, 54, 55, 12, 73, 1, 2, 26, 13, 5, 46, 30, 62, 19, 66, 14]},
     {u'drawTime': u'22-02-2016T09:05:00', u'drawNo': 542978, u'results': [71, 24, 4, 72, 14, 7, 63, 70, 3, 10, 42, 22, 15, 19, 79, 47, 1, 43, 55, 77]},   {u'drawTime': u'22-02-2016T09:10:00', u'drawNo': 542979, u'results': [24, 80, 45, 73, 72, 1, 41, 23, 56, 59, 31, 55, 29, 49, 51, 63, 40, 9, 21, 79]}
    

and it continues like that. Any advice would be very much appreciated.


Answer: Python has nice modules to parse JSON. Take a look here for quick examples:
<http://docs.python-guide.org/en/latest/scenarios/json/>

I'm not really sure what you want to do from your question though. What you
show in your snippet _is_ a Python data structure already... so you could just
access the list in question directly, e.g.:

    
    
    results_list = your_data['draws']['draw'][0]['results']
    

and/or make a copy of it if you need:

    
    
    new_list = old_list[:]
    

If you get JSON from somewhere as a string, you can just parse it and do the
same:

    
    
    import json
    your_data = json.loads(json_string)
    

