import re


def _handle_variable_parameter_value(variable_parameter_value, existing_parameters):
    """Parse the details about a variable parameter."""
    variable_name_pattern = '\$\{(?:ORGANIZATION|USER):(?:KEYCHAIN|TEXT):(.*?)}'
    variable_type_pattern = '\$\{(?:ORGANIZATION|USER):(KEYCHAIN|TEXT):'
    new_variable_name = re.findall(variable_name_pattern, variable_parameter_value)[0]
    new_variable_type = re.findall(variable_type_pattern, variable_parameter_value)[0].lower()

    for parameter in existing_parameters:
        if new_variable_name == parameter['name'] and new_variable_type == parameter['type']:
            return

    new_variable = {
        'type': new_variable_type,
        'name': new_variable_name
    }

    return new_variable