Parsing object in python
Question: 
    {u'jobs': {u'_total': 301746, u'_count': 10, u'_start': 0, u'values': [{u'position':       {u'title': u'Director of Sales, New York '}, u'id': 7489651}, {u'position': {u'title': u'Senior Software Development Engineer'}, u'id': 7489610}, {u'position': {u'title': u'Senior Analyst, Marketing Analytics'}, u'id': 7489572}, {u'position': {u'title': u'Director,  Quantitative Analytics'}, u'id': 7489559}, {u'position': {u'title': u'Senior Quantitative Analyst'}, u'id': 7489542}, {u'position': {u'title': u'Director - Progam Lead and Project Manager - Collateral Management'}, u'id': 7489520}, {u'position': {u'title': u'Accounting and Finance Manager'}, u'id': 7489519}, {u'position': {u'title': u'Software Development Engineer - Test'}, u'id': 7489508}, {u'position': {u'title': u'Sr. Sales Executive - Technology'}, u'id': 7489462}, {u'position': {u'title': u'Recruitment Manager'}, u'id': 7489264}]}}
    

Hi, I'm really really new to scripting in general - db programmer. I'm trying
to use a python linkedIN api that returns data formatted like above. Could
someone please help me parse that data out; I would like to store data into
some type of Python Data structure and then eventually write it into a
database.


Answer: [Python interface to the LinkedIn API](https://github.com/ozgur/python-
linkedin) has already returned you a python dict.

For example, you can extract a list of actual jobs from the data you've
provided:

    
    
    from pprint import pprint
    
    data = {u'jobs': {u'_total': 301746, u'_count': 10, u'_start': 0, u'values': [{u'position':       {u'title': u'Director of Sales, New York '}, u'id': 7489651}, {u'position': {u'title': u'Senior Software Development Engineer'}, u'id': 7489610}, {u'position': {u'title': u'Senior Analyst, Marketing Analytics'}, u'id': 7489572}, {u'position': {u'title': u'Director,  Quantitative Analytics'}, u'id': 7489559}, {u'position': {u'title': u'Senior Quantitative Analyst'}, u'id': 7489542}, {u'position': {u'title': u'Director - Progam Lead and Project Manager - Collateral Management'}, u'id': 7489520}, {u'position': {u'title': u'Accounting and Finance Manager'}, u'id': 7489519}, {u'position': {u'title': u'Software Development Engineer - Test'}, u'id': 7489508}, {u'position': {u'title': u'Sr. Sales Executive - Technology'}, u'id': 7489462}, {u'position': {u'title': u'Recruitment Manager'}, u'id': 7489264}]}}
    
    pprint(data['jobs']['values'])
    

prints a list of dictionaries:

    
    
    [{u'id': 7489651, u'position': {u'title': u'Director of Sales, New York '}},
     {u'id': 7489610,
      u'position': {u'title': u'Senior Software Development Engineer'}},
     {u'id': 7489572,
      u'position': {u'title': u'Senior Analyst, Marketing Analytics'}},
     {u'id': 7489559,
      u'position': {u'title': u'Director,  Quantitative Analytics'}},
     {u'id': 7489542, u'position': {u'title': u'Senior Quantitative Analyst'}},
     {u'id': 7489520,
      u'position': {u'title': u'Director - Progam Lead and Project Manager - Collateral Management'}},
     {u'id': 7489519, u'position': {u'title': u'Accounting and Finance Manager'}},
     {u'id': 7489508,
      u'position': {u'title': u'Software Development Engineer - Test'}},
     {u'id': 7489462,
      u'position': {u'title': u'Sr. Sales Executive - Technology'}},
     {u'id': 7489264, u'position': {u'title': u'Recruitment Manager'}}]
    

