def find_node(root, query):
    """ Interprets JSON as tree and finds first node with givens string. """

    if not isinstance(root, dict):  # skip leaf
        return None

    for key, value in root.items():
        if key == query:
            return value

        if not isinstance(value, list):
            value = [value]

        for node in value:
            rv = find_node(node, query)
            if rv:
                return rv
    return None