I am trying to extract data from a JSON object that is returned from the api call for api.trends () [Tweepy], but I cannot extract the data.
Can someone give me an example of how to retrieve data from a JSON object. I want to extract data in tabular form.
Thanks in advance.
Once you run it, but json.loads() , it will become a regular Python object. Just index it, like any file or list.
json.loads()
>>> json.loads('{"foo": 42, "bar": "baz"}')[u'bar'] u'baz'