def search(array, key, value):
    """Generic function to find a particular dictionary in a list of dictionaries,
    based on one key:value pair in each dict.
    """
    for item in array:
        if item[key] == value:
            return item
    return None