def findKeyInJson(jsonDict, searchKey):
    """ Search for recursive for a key in a JSON dictionary.

    General purpose function to look for a key in a json file.

    Parameters
    ----------
    jsonDict : dict()
        Dictionary containing a json structure
    searchKey : str
        The key to look for in the settings

    Returns
    -------
    value : jsonObject
        The json object that is found behind the searchKey.
    """
    for key in jsonDict:
        value = jsonDict[key]
        if key == searchKey:
            return value
        elif isinstance(value, dict):
            #launch recursion
            inner = findKeyInJson(value, searchKey)
            if inner is not None:
                return inner
    return None