I'm pulling from an xml file using etree where I've extracted the following from a tag called dc as text:
<dc>[{"name": "Smith", "affiliation": "UofHawaii"}, {"name": "Doe", "affiliation": "UW"}]</dc>
so I have dc = [{"name": "Smith", "affiliation": "UofHawaii"}, {"name": "Doe", "affiliation": "UW"}]
I want to parse this out to have names and affiliations as lists:
names = Smith, Doe
affiliations = UofHawaii, UW
Is there a simple way to do this? I can see that it's similar to a dictionary but not quite. The number of names and affiliations does vary in the tree from 1 to 4.
Thanks.