def get_path(json_result, key, path=None):
    """Find first occurrence of a key inside a nested dictionary. This is helpful
    only for unique keys across all nested brances of a dictionary and will
    return confusing results for dictionaries that do not conform to this rule.

    Returns list of results::

       >>> content =
       ...  {'attributes':
       ...      {'contentencoded': None, 'tags': [None], 'published': None,
       ...       'contenttemplated': None, 'title': None, 'guid': inf,
       ...       'description': None, 'byline': None, 'teaser': None},
       ...       'version': None, 'links': {'collection': [inf], '
       ...        item': [None],
       ...   'links' : [{'creator': 'https://someurl'}]
       ...     }
       >>> get_path(content, 'attributes')
       ['attributes']
       >>> get_path(content, 'tags')
       ['attributes', 'tags']
       >>> get_path(conent, 'creator')
       ['links', 0, 'creator']

    Args:

       `json_result` -- nested JSON dictionary values
       `key` -- key whose path we'd like to discover

    Kwargs:

       `path` -- The path gets built on recursive calls.

    This function is only valid for unique keys. Use `generate_paths` to
    find all routes to a particular key inside a JSON object.
    """
    if path is None:
        path = []
    if isinstance(json_result, int) or isinstance(json_result, str):
        path = []
        return path
    elif isinstance(json_result, dict):
        for k, v in json_result.items():
            if key == k:
                path.append(key)
                return path
            else:
                result = get_path(v, key, path)
                if result:
                    path.append(k)
                    return path
    elif isinstance(json_result, list):
        for idx, item in enumerate(json_result):
            result = get_path(item, key, path)
            if result:
                path.append(idx)
                return path