json.loads() not converting into dict

I am having trouble with parsing a specific key from a json string in a table. Below is my code to read a csv file and extract “employee_id” from the json column in each row:

with open('data.csv') as csvFile:
    csv_reader = csv.reader(csvFile, delimiter=',')
    next(csv_reader, None)  # skips the header row

for row in csv_reader:
    event_data = row[4]
    data = json.loads(event_data)
    print(data['employee_id'])

Here is a sample event_data output:

"{"py/object": "employee_information.event_types.EmployeeCreated", "employee_id": "98765", "employee_first_name": "Jonathan", "employee_last_name": "Smith", "application_id": "1234", "address": "1234 street"}"

But I get an error that says:

Traceback (most recent call last):
  File "/Users/user/Documents/python_test/main.py", line 14, in <module>
    print(data['employee_id'])
TypeError: string indices must be integers

I checked the type for data and it returns a str. I thought that json.loads was suppose to convert the json string into a python dict?

Answer

event_data is doubly-encoded for some reason, so you need to decode it twice.

data = json.loads(json.loads(event_data))