import json


def parseOutput(outputMsg):
    """ parse the full stdOut from call to endUser_sim to get the returned result """
    resultStr = outputMsg.split('\n')[-2]
    resultStr = resultStr.replace("'", '"')       # make single quotes double
    resultStr = resultStr.replace('True', '"True"') # put quotes around 'True'
    resultDict = json.loads(resultStr)
    return resultDict['testResult']