Would you happen to have a snippet? Trying to make the same thing.
I ended up hacking something together using the scripts from here and added on this helper to extract that dynamic id key:
def get_first_item(my_dict):
if my_dict:
first_key = next(iter(my_dict))
return my_dict[first_key]
else:
return None