import json


def query_list_to_dict(query_list_str):
    """
    Returns a 'label' and 'text' from a Rapidpro values JSON string as a dict.
    """
    data_list = json.loads(query_list_str)
    data_dict = dict()
    for value in data_list:
        data_dict[value['label']] = value['text']

    return data_dict