I am using API to get data from Recruitee Website through Python. I have the following JSON data.

I am using this code to get the name of hired candidates.
def main(): active_requisitions_data = get_active_requisitions() if active_requisitions_data: for requisition in active_requisitions_data: requisition_id = requisition['id'] print(f"Processing requisition with ID: {requisition_id}") openings = requisition.get('openings', []) hired_candidates = [] for opening in openings: if opening['status'] == 'filled': placement = opening.get('placement') if placement: candidate = placement.get('candidate') if candidate: hired_candidates.append(candidate['name']) if hired_candidates: requisition['hired_candidates'] = ', '.join(hired_candidates) else: requisition['hired_candidates'] = 'No hired candidates' # Create DataFrame df = pd.DataFrame(active_requisitions_data) # Output to Excel df.to_excel('active_requisitions_with_hired_candidates.xlsx', index=False) However, the can't load the placement dictionary which is inside the "openings" list.I tried to debug. Then noticed that placement isn't stored inside the openings (see picture). Where is the issue? How can I get the name of the hired candidates?

Источник: https://stackoverflow.com/questions/780 ... python-api