Hi!
I am having trouble getting the job_highlights > Qualifications info into my program. I am using Python. Have tried
for job in jobs response[‘data’]
jobQualifications = job[job_highlights’][‘Qualifications’]
print(jobQualifications)
result is key error
and also
an inner for loop like
for qualifications in job #further inner item than 'data'
jobQualifications = qualifications['job_highlights']
print(jobQualifications)
result is key error
Thank you for any help!
Partecipa alla discussione - aggiungi un commento di seguito:
Hi there!
Thank you for your message.
Not every job has a job_highlights.Qualifications field, you can check if the key exist before accessing it. Here’s an example:
for job in jobs response[‘data’]:
if ‘job_highlights’ in job and ‘Qualifications’ in job[‘job_highlights’]:
print(job[‘job_highlights’][‘Qualifications’])
Does it work for you?
Thank you,
Adam @ OpenWeb Ninja