import re


def process_input(string):
    """
    The json files are written in the following format:
        {'key': '"value"'}

    This function removes the initial and ending quotes and any '\n' in value.
    Example:
    Input: '"value1\nvalue2"'
    Output: 'value value2'
    """
    if type(string) != str:
        string = ""
    if string:
        if string[0] == '"':
            string = string[1:]
        if string[-1] == '"':
            string = string[:-1]
    string = re.sub(' +', ' ', string)  # removes more than one white space
    return string.replace("\\n", " ")