-1

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?

dojogeorge
  • 1,674
  • 3
  • 25
  • 35

1 Answers1

1
for b in response['businesses']:
    print b.get('name', 'missing')
satoru
  • 31,822
  • 31
  • 91
  • 141