These are the contents of my text file (eg:abc.doc):
{\'data\': [{\'name\': \'abc\'},{\'name\': \'xyz\'}]}
After opening the file in python; h
Looks to me like you have json, which can be easily parsed using pyjson:
import json obj=json.loads(u'''{'data': [{'name': 'abc'},{'name': 'xyz'}]}''')
Bob's your uncle now, innit?