def METHOD_NAME(self, data, function, keys=[]):
    for key, value in data.copy().items():
        currentKey = keys.copy()
        currentKey.append(key)
        if isinstance(value, dict):
            self.METHOD_NAME(value, function, keys=currentKey)
        elif type(value) == str:
            internal_key = json.dumps(currentKey)
            dot_key = ".".join(currentKey)
            function(internal_key, dot_key, value)