Search an object hierarchy for an object by name. This is useful for searching for a specific object in a saved scenario .json file.
find_hierarchy_object(x, name, include_children = FALSE, partial_match = FALSE)
Arguments
- x
The object hierarchy to search. This is typically a list loaded from a scenario .json file.
- name
The object name to search for.
- include_children
Should children be included in the result?
- partial_match
Should the name match exactly (FALSE, default) or can it be a part of the actual name?
Value
The matching object, or NULL if none found.