19 lines
374 B
Python
19 lines
374 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"]]
|
|
|
|
for key in part.get("keys", []):
|
|
value = value[key]
|
|
|
|
result += str(value)
|
|
else:
|
|
result += part
|
|
|
|
return result
|