def get_value(obj, key):
    """mongodb style get value

    >>> get_value({'a': {'b': {'c': 1}}}, 'a.b.c') == 1
    True
    >>> get_value({'a': {'b': {'c': 1}}}, 'x.y.z') is None
    True
    """
    keys = key.split('.', 1)
    if len(keys) == 2:
        return get_value(obj.get(keys[0], {}), keys[1])
    else:
        return obj.get(keys[0], None)