Question

I have a yelp response as linked here. I am trying to print out just a list of the names returned. I have tried the following:

print response['name']
print response[0]
print response[0]['name']

And all seem to give error. How do I access a list of just place names? Or just one place name?

Was it helpful?

Solution

for b in response['businesses']:
    print b.get('name', 'missing')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top