Once you upload this file using PyYaml, it will have this structure:
{
'list1': {
'title': "This is the title",
'active': True,
},
'list2: {
'active': False,
},
}
You can iterate with:
for k, v in my_yaml.iteritems():
if 'title' in v:
else:
source
share