21 lines
404 B
Python
21 lines
404 B
Python
def buildPath(path, outputs):
|
|
if isinstance(path, str):
|
|
return path
|
|
|
|
result = ""
|
|
|
|
for part in path:
|
|
if isinstance(part, dict):
|
|
value = outputs[part["output"]][part["keys"]]
|
|
|
|
|
|
|
|
#for key in part.get("keys", []):
|
|
#value = value[key]
|
|
|
|
result += str(value)
|
|
else:
|
|
result += part
|
|
|
|
return result
|