def json_path(path, data):
    """Extract property by path"""
    fragments = path.split('.')
    src = data
    for p in fragments:
        src = src[int(p)] if isinstance(src, list) and p.isdigit(
            ) else src.get(p, {})
    return src
