When I export some geometry data from my model I got back a fairly deeply nested JSON object. There is one particular object key I am not sure about.
The key: "fd81d7e13698aaa513aa0e7bae78449b"
This is among the outputs but there is no reference in advance. Is it possible to get know this key before a request? And maybe mapped with the name of the output?
@Joseph_Oster thanks for your suggestion and workaround. It can be a partial solution for now but shouldn’t be the way forward. The returning object from an export is unnecessarily deeply nested. These keys could be an id field or similar inside the object, and the export geometry objects can live in a simple array we can iterate trough. I hope the SDK mentioned in the other post will produce much flatter response objects.
This is my Python version of using the recursive function, as we run some Flask app in the back-ends:
def key_recursive(d, key):
if key in d:
for k, v in d.items():
if type(v) is dict:
value = key_recursive(v, key)
But the problem is, and the same with yours, it fails if it hits a list (array).