Suppose I have a series of tweets in the form of a dictionaries in the following structure:
Tweet = {
'created_at': 'Thu Apr 21 16:03:40 +0000 2016',
'text': 'Look at this dog!',
'entities': {'hashtags': ['dog'] },
'favorite_count': 0,
'user': {'screen_name': 'Jake_Jake'},
'retweet_count': 0
}
I'd like to create a new dictionary so that the 'hashtags' and 'screen_name' key and value is no longer nested:
{'created_at': 'Thu Apr 21 16:03:40 +0000 2016', 'text': 'Look at this dog!', 'favorite_count': 0, 'hashtags': ['dog'], 'retweet_count': 0, 'screen_name': 'Jake_Jake'}
Any suggestion as to how I could accomplish this? Thank you.