def _get_dogma_value(wh_data, key):
    """
    Find a dictionary identified by a key, in a list of dictionaries
    :param wh_data: the dictionary to search
    :param key: the key to identify the correct dictionary
    :return: the value in the correct dictionary
    """
    dogma_attr = wh_data.get('dogma_attributes')
    return next(element for element in dogma_attr if element.get('attribute_id') == key).get('value')