Search for itemSection instead of using fixed index (fixes #8)
This commit is contained in:
parent
89c74995ad
commit
826a72c817
2 changed files with 12 additions and 3 deletions
|
|
@ -135,4 +135,11 @@ def get_item_text(item, index, run_index=0):
|
|||
def nav(root, items):
|
||||
"""Access a nested object in root by item sequence."""
|
||||
for k in items: root = root[k]
|
||||
return root
|
||||
return root
|
||||
|
||||
|
||||
def find_object_by_key(object_list, key):
|
||||
for item in object_list:
|
||||
if key in item:
|
||||
return item
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in a new issue