Filter list of dictionaries
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".
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.