Skip to content

Instantly share code, notes, and snippets.

View BrandonFanti's full-sized avatar
💭
so much

BrandonFanti

💭
so much
  • H2O Connected, LLC
  • Coatesville, PA
View GitHub Profile
@BrandonFanti
BrandonFanti / iter_all.py
Last active April 13, 2023 08:18
Find a key for a dictionary - at any level of nesting in either lists or dictionaries
'''
I could not find a function to get the key of a given collection of dictionaries OR arrays, at any depth, AND provide the path
Though SURELY it must exist
'''
def iter_instructor(x, key_target):
'''
Recursively searches the object for the given key