pvdeg.utilities.search_json#
- pvdeg.utilities.search_json(pvdeg_file: str = None, fp: str = None, name_or_alias: str = None) str[source]#
Search through 2 level JSON.
Search through 2 level JSON with arbitrary key names for subkeys with matching attributes of name or alias.
- Parameters:
pvdeg_file (str) – keyword for material json file in pvdeg/data. Options: >>> “AApermeation”, “H2Opermeation”, “O2permeation”
fp (str) – file path to material parameters json with same schema as material parameters json files in pvdeg/data. pvdeg_file will override fp if both are provided.
name_or_alias (str) – searches for matching subkey value in either name or alias attributes. Exits on the first matching instance.
- Returns:
jsonkey (str) – arbitrary key from json that owns the matching subattribute of name or alias.