bklukaczewski
5/13/2016 - 8:45 AM

Filter list of dictionaries for dicts that have specific value in a specific key

Filter list of dictionaries for dicts that have specific value in a specific key

# filter returns a list
return filter(lambda x: key in x and x[key] in allowed, data)