def get_frame_from_json(frame):
    """Get/sanitize raw frame from JSON of frame from `tshark -x -T json ...`

    Args:
        frame (dict): A dict of a single packet from tshark.
    Returns:
        (str): The ASCII hexdump value of a packet
    """
    if not isinstance(frame, dict):
        print('frame is type', type(frame))
        raise TypeError("Frame must be dict!\n" + str(frame)[:120] + '...')
    frame_raw = frame['_source']['layers']['frame_raw']
    # Sometimes we get a list including the frame str instead of the frame str.
    if isinstance(frame_raw, list):
        frame_raw = frame_raw[0]
    return frame_raw