import json


def get_input(decision):
    """
    From the decision response, which is JSON data form SWF, get the
    input data that started the workflow
    """
    try:
        input = json.loads(decision["events"][0]["workflowExecutionStartedEventAttributes"]["input"])
    except KeyError:
        input = None
    return input