def get_default_data(data, category):
    """
    Find the default value from a list of data, return the first one if no default found
    :param data: the data to search in
    :param category: the category of the data
    :return: one name contained in data
    """
    for _data in data:
        if _data.get('category').get('name') == category:
            if _data.get('extra', {}).get('action') == 'default':
                return _data.get('name')
    for _data in data:
        if _data.get('category').get('name') == category:
            return _data.get('name')
