INNER CODE UNIT · Python
navigate_to_path
ahembree/ansible-hms-docker · settings_manager.py:198
def navigate_to_path(root_data, path_list):
"""Navigate to a specific path in the data structure."""
current = root_data
for key in path_list[:-1]: # Navigate to parent
if isinstance(key, str) and key.startswith('[') and key.endswith(']'):
# List index
index = int(key[1:-1])
current = current[index]
else:
current = current[key]
return current
def display_search_results(results):
"""Display search results and allow user to select one to edit."""
if not results:
print("❌ No results found.")
return None