I need help. I want to print all pageid,title from json format using for loop. Can anyone help? thanks
{"query":
{"categorymembers":[{"pageid":13012551,"ns":0,"title":"List of Indian Punjabi films"}
,{"pageid":13662758,"ns":0,"title":"List of Punjabi language films"},
{"pageid":4628722,"ns":0,"title":"Ae Fond Kiss..."},
{"pageid":32991974,"ns":0,"title":"Aik Aur Ghazi"},
{"pageid":24605022,"ns":0,"title":"Asa Nu Maan Watna Da"},
{"pageid":21467628,"ns":0,"title":"Asoo Billa"},
{"pageid":17757556,"ns":0,"title":"Chaddian Di Doli"},
{"pageid":21369620,"ns":0,"title":"Chadi Jawani Budhe Nu"},
{"pageid":32012994,"ns":0,"title":"Chak De Phatte"},
{"pageid":13664636,"ns":0,"title":"Chann Mahi (1956 film)"}]}}
Try this – In python 2.6.1 there is a module called json this parses json string in python objects