JSON Extraction in Python. -


trying specific data through json format , i'm unable so. trying in python , want more 1 thing printed out. im providing example code make clear. name of file blah

{ u'info': { u'more_info': { u'xyz': u'[]',                            u'xyz': none,                            u'xyz': 00000,                            u'description': u'blah blah blah',                            u'xyz': 0000,                            u'url':                            u'xyz': false,                            u'name': u'blah blah',                            u'xyz': 10,                            u'xyz': 1, 

i refer documentation, still fails me.

i tried

for xyz in blah['info']['more_info']: fs = xyz['name']['description']['url']  

the error that: "typeerror: string indices must integer"

please help.

iterating on dict yields keys. since have dict, access items directly.

print blah[u'info'][u'more_info'][u'name'] print blah[u'info'][u'more_info'][u'description'] print blah[u'info'][u'more_info'][u'url'] 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -