This is my example:
dictlist = [{'first': 'James', 'last': 'Joule'},
{'first': 'James','last': 'Watt'},
{'first': 'Christian','last': 'Doppler'}]
I am trying to get the last name. If this was in a model, the code would be:
getdata = Name.objects.filter(name="Christian")
getLastName = getdata.last
and I would get "Doppler"
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…