def extract_json_from_line(line):
    """Extracts the JSON from a line of JS that we know has a { in it.

    It's assumed that this line has already had .strip() called on it (i.e.
    it has no leading or trailing whitespace).
    """

    # The -1 in the slicing operation below removes the trailing semicolon
    # (since this is a line of JS code)
    return line[line.index("{") : -1]