I have been tasked to create a JSON string which I then need to convert into a python dictionary.
I am just getting errors about extra data and I am unsure what to do next
import json
company = '{"Name": "George", "Manages": ["James", "Jamilia"]}, {"Name": "James", "Manages": ["Jill", "Jenny"]}, {"Name": "Jamilia", "Manages": ["Jasmine", "Jewel", "Jenny"]}'
company_dict = json.loads(company)
The task I am trying to complete is the following question: George runs a company. He manages James and Jamila, who each have a small team to manage. In James' team are Jill and Jenny. In Jamila's team are Jewel, Jasmine and Jeremy.
Create a JSON object in a string variable called company where each item has a name field and a field called manages which contains an array of the people managed by that person. If a person does not manage anybody, they have no field called manages.
Then convert the JSON string to a dictionary in a variable called company_dict.
