This is probably very simple but i cant figure it out :(
Im trying to get the list of all captions form the list below
mylist = [{'Caption': 'obj1'},{'Caption': 'obj2'},{'Caption': 'obj3'}]
print(mylist)
captions = map(lambda o: o.Caption, mylist)
but im getting AttributeError: 'dict' object has no attribute 'Caption'
i can write the same in Ansible {{ mylist | map(attribute='Caption')|list}}
but no idea in Python :(