I was ask to extract data from a JSON file using Python. The original JSON file looks like this:
{"votes": {"funny": 15, "useful": 48, "cool": 18}, "user_id": "JkeCKyEaQlbLd9uZYl4DjA", "name": "LiiLii C.", "url": "http://www.yelp.com/user_details?userid=JkeCKyEaQlbLd9uZYl4DjA", "average_stars": 3.2258064516128999, "review_count": 31, "type": "user"}
{"votes": {"funny": 0, "useful": 2, "cool": 0}, "user_id": "cs91PAsv6esdWAaSkzm2lg", "name": "Jan Ellen T.", "url": "http://www.yelp.com/user_details?userid=cs91PAsv6esdWAaSkzm2lg", "average_stars": 3.0, "review_count": 4, "type": "user"}
And I was asked to use Python to extract this file and give an output file that looks like this:
name city state stars review_count main_category
Southern California Medical Group Los Angeles CA 3.5 2 Medical Centers
Harvard Square Shiatsu Cambridge MA 4.0 4 Massage
Faith & Glory Collective Kitchener ON 4.0 2 Tattoo
Von's Records & Posters West Lafayette IN 3.5 3 Music & DVDs
JP's Java Austin TX 3.5 85 Food
I am really confused by this assignment because I don't understand why the output file has nothing similar to the original JSON file. And is this because I need to extract data from the JSON file through each provided link? And if this is the case, how should I do this task?