def get_item_in_dict(dictionary, item):
    """
    Get dictionary item from a dotted-word.

    >>> get_item_in_dict({"x": 1}, "x")
    1
    >>> get_item_in_dict({"x": {"y": 42}}, "x.y")
    42
    """
    current = dictionary
    for word in item.split('.'):
        if word in current:
            current = current[word]
        else:
            return None
    return current
