Everytime I extract from JSON data, I will got TypeError: unhashable type: 'dict'
My json info
u 'paging': {
u 'cursors': {
u 'after': u 'MTQyNzMzMjE3MDgxNzUzOQZDZD', u 'before': u 'OTUzNDg3MjMxMzQ2NjQ0'
}
}, u 'data': [{
u 'access_token': u 'XXXXX',
u 'category': u 'Internet/Software', u 'perms': [u 'ADMINISTER',
u 'EDIT_PROFILE', u 'CREATE_CONTENT', u 'MODERATE_CONTENT',
u 'CREATE_ADS', u 'BASIC_ADMIN'
], u 'name': u 'Nurdin Norazan Services', u 'id': u '953487231346644'
}, {
u 'access_token': u 'XXXXX',
u 'category': u 'Internet/Software', u 'perms': [u 'ADMINISTER',
u 'EDIT_PROFILE', u 'CREATE_CONTENT', u 'MODERATE_CONTENT',
u 'CREATE_ADS', u 'BASIC_ADMIN'
], u 'name': u 'Intellij System Solution Sdn. Bhd.', u 'id': u '433616770180650'
}]
}
My code
data = json.load(urllib2.urlopen("https://graph.facebook.com/v2.7/me/accounts?access_token="XXXXX")
print (data[data][0][id]) //953487231346644
Incidentally, how to print loop data?